diff --git a/.devops/进阶1.yml b/.devops/进阶1.yml new file mode 100644 index 0000000..5896d97 --- /dev/null +++ b/.devops/进阶1.yml @@ -0,0 +1,58 @@ +version: 2 +name: 进阶1 +description: "" +global: + concurrent: 1 +trigger: + webhook: gitlink@1.0.0 + event: + - ref: push + ruleset-operator: AND +workflow: + - ref: start + name: 开始 + task: start + - ref: docker_image_build_0 + name: docker镜像构建 + task: docker_image_build@1.6.0 + input: + docker_username: ((wangxin22.docker_user)) + docker_password: ((wangxin22.docker_pswd)) + image_name: '"crpi-8qmkfh15gc3yl0m3.cn-hangzhou.personal.cr.aliyuncs.com/harold12/reposyncer"' + image_tag: '"latest"' + registry_address: '"crpi-8qmkfh15gc3yl0m3.cn-hangzhou.personal.cr.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: + username: ((Harold.Harold)) + password: ((Harold.Harold_key)) + remote_url: '"https://www.gitlink.org.cn/HaroldSu/reposync.git"' + ref: '"refs/heads/master"' + commit_id: '""' + depth: 1 + needs: + - start + - ref: ssh_cmd_0 + name: ssh执行命令 + task: ssh_cmd@1.1.1 + input: + ssh_pass: ((Harold.Harold_ssh_key)) + ssh_ip: '"47.98.140.99"' + ssh_port: '"22"' + ssh_user: '"root"' + ssh_cmd: '"docker stop reposyncer ; docker rm reposyncer ; docker pull crpi-8qmkfh15gc3yl0m3.cn-hangzhou.personal.cr.aliyuncs.com/harold12/reposyncer:latest ; docker run -d -p 8000:8000 --name reposyncer crpi-8qmkfh15gc3yl0m3.cn-hangzhou.personal.cr.aliyuncs.com/harold12/reposyncer:latest bash start.sh -s backend"' + needs: + - docker_image_build_0 + - ref: end + name: 结束 + task: end + needs: + - ssh_cmd_0 \ No newline at end of file