refactor: .devops/devops.yml

This commit is contained in:
pzthu8lr3 2024-07-08 11:57:06 +00:00 committed by jianmu
parent bd23c983e2
commit 69793b23be
1 changed files with 6 additions and 31 deletions

View File

@ -20,41 +20,16 @@ workflow:
ssh_ip: '"47.96.136.178"'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: '"docker stop rtsw && docker rm rtsw && docker pull
registry.cn-guangzhou.aliyuncs.com/gitlink_help_center_rtsw/ruantishengwu
&& docker run --name rtsw -d -p 3000:3000
registry.cn-guangzhou.aliyuncs.com/gitlink_help_center_rtsw/ruantishengwu"'
ssh_cmd: '"pm2 stop rtsw && pm2 delete rtsw && cd gitlink && rm -r
gitlink_help_center && git clone
https://gitlink.org.cn/Dongjiaqi/gitlink_help_center.git && cd
gitlink_help_center && npm install && pm2 start npm --name rtsw --run
dev"'
needs:
- docker_image_build_0
- start
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0
- ref: docker_image_build_0
name: docker镜像构建
task: docker_image_build@1.6.0
input:
docker_username: ((docker.admin))
docker_password: ((docker.password))
image_name: '"registry.cn-guangzhou.aliyuncs.com/gitlink_help_center_rtsw/ruantishengwu"'
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: git_clone_0
name: git clone
task: git_clone@1.2.9
input:
remote_url: '"https://gitlink.org.cn/Dongjiaqi/gitlink_help_center.git"'
ref: '"refs/heads/yuankaifeng_branch"'
commit_id: '""'
depth: 1
needs:
- start