|
|
|
@ -3,60 +3,27 @@ name: 未命名项目
|
|
|
|
|
description: ""
|
|
|
|
|
global:
|
|
|
|
|
concurrent: 1
|
|
|
|
|
trigger:
|
|
|
|
|
webhook: gitlink@1.0.0
|
|
|
|
|
event:
|
|
|
|
|
- ref: push
|
|
|
|
|
ruleset-operator: AND
|
|
|
|
|
workflow:
|
|
|
|
|
- ref: start
|
|
|
|
|
name: 开始
|
|
|
|
|
task: start
|
|
|
|
|
- ref: git_clone_0
|
|
|
|
|
name: git clone
|
|
|
|
|
task: git_clone@1.2.9
|
|
|
|
|
input:
|
|
|
|
|
username: ((ganshihao21.ganshihao21_user))
|
|
|
|
|
password: ((ganshihao21.ganshihao21))
|
|
|
|
|
remote_url: '"https://gitlink.org.cn/ganshihao21/reposync.git"'
|
|
|
|
|
ref: '"refs/heads/master"'
|
|
|
|
|
commit_id: '""'
|
|
|
|
|
depth: 1
|
|
|
|
|
- ref: shell_0
|
|
|
|
|
name: shell
|
|
|
|
|
image: docker.jianmuhub.com/library/alpine:3.17.0
|
|
|
|
|
script:
|
|
|
|
|
- echo'begin'
|
|
|
|
|
needs:
|
|
|
|
|
- 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/reposync_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: ssh_cmd_0
|
|
|
|
|
name: ssh执行命令
|
|
|
|
|
task: ssh_cmd@1.1.1
|
|
|
|
|
- ref: code_check_0
|
|
|
|
|
name: 代码检查
|
|
|
|
|
task: xxq250/code_check@1.0.1
|
|
|
|
|
input:
|
|
|
|
|
ssh_pass: ((ssh_key.ssh_key))
|
|
|
|
|
ssh_ip: '"47.96.164.145"'
|
|
|
|
|
ssh_port: '"22"'
|
|
|
|
|
ssh_user: '"root"'
|
|
|
|
|
ssh_cmd: '"docker stop abc_group5 && docker rm abc_group5 && docker pull
|
|
|
|
|
registry.cn-guangzhou.aliyuncs.com/nudt_devops/reposync_group5:latest &&
|
|
|
|
|
docker run -d -p 3000:3000 --name abc_group5
|
|
|
|
|
registry.cn-guangzhou.aliyuncs.com/nudt_devops/reposync_group5:latest"'
|
|
|
|
|
key: '"wangfengzhi"'
|
|
|
|
|
needs:
|
|
|
|
|
- docker_image_build_0
|
|
|
|
|
- shell_0
|
|
|
|
|
- ref: end
|
|
|
|
|
name: 结束
|
|
|
|
|
task: end
|
|
|
|
|
needs:
|
|
|
|
|
- ssh_cmd_0
|
|
|
|
|
- code_check_0
|
|
|
|
|
|
|
|
|
|