This commit is contained in:
eazzy 2024-05-27 15:32:27 +08:00
commit a27cf82961
2 changed files with 9 additions and 18 deletions

View File

@ -20,14 +20,10 @@ workflow:
ssh_ip: '"121.43.168.217"'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: "\"docker stop groupeazzy && docker rm groupeazzy && docker pull
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_grou\
peazzy:latest && docker images | grep
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_grou\
peazzy | awk '{if ($2 != \"latest\") print$3}' | xargs docker rmi &&
docker run -d -p 3000:3000 --name groupeazzy
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_grou\
peazzy:latest\""
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"'
needs:
- start

View File

@ -53,17 +53,12 @@ workflow:
input:
ssh_pass: ((ssh.key))
ssh_ip: '"121.43.168.217"'
ssh_port: '"3000"'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: >-
"docker stop $(docker ps -a -q --filter
ancestor=registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_groupeazzy:latest)"
"docker rm $(docker ps -a -q --filter ancestor=registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_groupeazzy:latest)"
"docker pull registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_groupeazzy:latest"
"docker run -p 3000:3000 registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_groupeazzy:latest"
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"'
needs:
- docker_image_build_0