From f37414c02bc0c9c2519ffdea03e27f1e290cefc5 Mon Sep 17 00:00:00 2001 From: ganshihao21 <1410815216@qq.com> Date: Wed, 29 May 2024 03:46:39 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20.devops/=E6=9C=AA=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devops/未命名项目.yml | 59 +++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .devops/未命名项目.yml diff --git a/.devops/未命名项目.yml b/.devops/未命名项目.yml new file mode 100644 index 0000000..ac5be5f --- /dev/null +++ b/.devops/未命名项目.yml @@ -0,0 +1,59 @@ +version: 2 +name: 未命名项目 +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: ((nudt_devops.nudt_devops)) + docker_password: ((nudt_devops.nudt_devops)) + image_name: '"registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group5"' + 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/shuaihao/gitlink_help_center.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: ((ssh_key.ssh_key)) + ssh_ip: '"47.96.164.145"' + ssh_port: '"22"' + ssh_user: '"root"' + ssh_cmd: '"docker stop ghc_group5 && docker rm ghc_group5 && docker run -d -p + 3000:3000 --name ghc_group5 + registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group5:latest"' + needs: + - docker_image_build_0 + - ref: end + name: 结束 + task: end + needs: + - ssh_cmd_0 +