You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.8 KiB
63 lines
1.8 KiB
version: 2
|
|
name: feng
|
|
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: ((user.name))
|
|
password: ((mima.mima))
|
|
remote_url: '"https://gitlink.org.cn/fengyujue/gitlink_help_center.git"'
|
|
ref: '"refs/heads/master"'
|
|
commit_id: '""'
|
|
depth: 1
|
|
needs:
|
|
- 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.name))
|
|
docker_password: ((docker.mima))
|
|
image_name: '"crpi-ybi767umyzh9owc0.cn-hangzhou.personal.cr.aliyuncs.com/help-center-gitlink/gitlink_help_gitlink"'
|
|
image_tag: '"latest"'
|
|
registry_address: '"crpi-ybi767umyzh9owc0.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: ssh_cmd_0
|
|
name: ssh执行命令
|
|
task: ssh_cmd@1.1.1
|
|
input:
|
|
ssh_pass: ((ssh.password))
|
|
ssh_ip: '"120.27.137.186"'
|
|
ssh_port: '"22"'
|
|
ssh_user: '"root"'
|
|
ssh_cmd: '"docker stop group8 || true && docker rm group8 || true && docker pull
|
|
crpi-ybi767umyzh9owc0.cn-hangzhou.personal.cr.aliyuncs.com/help-center-gitlink/gitlink_help_gitlink:latest
|
|
&& docker run -d -p 3000:3000 --name group8
|
|
crpi-ybi767umyzh9owc0.cn-hangzhou.personal.cr.aliyuncs.com/help-center-gitlink/gitlink_help_gitlink:latest"'
|
|
needs:
|
|
- docker_image_build_0
|
|
|