2024-05-23 22:51:50 +08:00
|
|
|
version: 2
|
|
|
|
name: 自动上传镜像
|
|
|
|
description: ""
|
|
|
|
global:
|
|
|
|
concurrent: 1
|
2024-05-25 20:35:48 +08:00
|
|
|
trigger:
|
|
|
|
webhook: gitlink@1.0.0
|
|
|
|
event:
|
|
|
|
- ref: push
|
|
|
|
ruleset:
|
|
|
|
- param-ref: branch
|
|
|
|
operator: EQ
|
|
|
|
value: '"master"'
|
|
|
|
ruleset-operator: AND
|
2024-05-23 22:51:50 +08:00
|
|
|
workflow:
|
|
|
|
- ref: start
|
|
|
|
name: 开始
|
|
|
|
task: start
|
|
|
|
- ref: git_clone_0
|
|
|
|
name: git clone
|
|
|
|
task: git_clone@1.2.9
|
|
|
|
input:
|
|
|
|
remote_url: '"https://gitlink.org.cn/Eazzy/gitlink_help_center.git"'
|
|
|
|
ref: '"refs/heads/master"'
|
|
|
|
commit_id: '""'
|
|
|
|
depth: 1
|
|
|
|
needs:
|
|
|
|
- start
|
|
|
|
- ref: docker_image_build_0
|
|
|
|
name: docker镜像构建
|
|
|
|
task: docker_image_build@1.6.0
|
|
|
|
input:
|
|
|
|
docker_username: ((docker.username))
|
|
|
|
docker_password: ((docker.docker_key))
|
2024-05-23 23:03:21 +08:00
|
|
|
image_name: '"registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_groupeazzy"'
|
2024-05-23 22:51:50 +08:00
|
|
|
image_tag: '"latest"'
|
|
|
|
registry_address: '"registry.cn-guangzhou.aliyuncs.com"'
|
|
|
|
docker_file: '"Dockerfile"'
|
|
|
|
docker_build_path: '"."'
|
|
|
|
workspace: git_clone_0.git_path
|
|
|
|
image_push: true
|
|
|
|
build_args: '""'
|
|
|
|
needs:
|
|
|
|
- git_clone_0
|
|
|
|
- ref: end
|
|
|
|
name: 结束
|
|
|
|
task: end
|
2024-05-25 20:35:11 +08:00
|
|
|
needs:
|
|
|
|
- ssh_cmd_0
|
|
|
|
- ref: ssh_cmd_0
|
|
|
|
name: ssh执行命令
|
|
|
|
task: ssh_cmd@1.1.1
|
|
|
|
input:
|
2024-05-25 20:50:37 +08:00
|
|
|
ssh_pass: ((ssh.key))
|
2024-05-25 20:35:11 +08:00
|
|
|
ssh_ip: '"121.43.168.217"'
|
2024-05-27 14:59:28 +08:00
|
|
|
ssh_port: '"22"'
|
2024-05-25 20:35:11 +08:00
|
|
|
ssh_user: '"root"'
|
2024-05-27 14:59:28 +08:00
|
|
|
ssh_cmd: '"docker stop groupeazzy && docker rm groupeazzy && docker pull
|
|
|
|
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_groupeazzy:latest
|
|
|
|
&& docker run -d -p 3000:3000 --name groupeazzy
|
|
|
|
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_groupeazzy:latest"'
|
2024-05-23 22:51:50 +08:00
|
|
|
needs:
|
|
|
|
- docker_image_build_0
|
|
|
|
|