forked from Gitlink/gitlink_help_center
72 lines
2.0 KiB
YAML
72 lines
2.0 KiB
YAML
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: git_clone_0
|
||
name: git clone
|
||
task: git_clone@1.2.9
|
||
input:
|
||
remote_url: '"https://www.gitlink.org.cn/luoyi21a/reposync.git"'
|
||
ref: '"refs/heads/master"'
|
||
commit_id: '""'
|
||
depth: 1
|
||
needs:
|
||
- start
|
||
- ref: docker_image_build_0
|
||
name: docker镜像构建
|
||
task: docker_image_build@1.6.0
|
||
input:
|
||
docker_username: ((docker.nudt_devops))
|
||
docker_password: ((docker.nudt_devops))
|
||
image_name: '"registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_reposync_group3"'
|
||
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: gitlink_ssh_cmd_0
|
||
name: ssh执行命令(支持跳板机)
|
||
task: yystopf/gitlink_ssh_cmd@0.0.7
|
||
input:
|
||
ssh_private_key: ((ssh_key.a))
|
||
remote_host: '"47.97.179.90"'
|
||
remote_port: '"22"'
|
||
remote_user: '"root"'
|
||
gateway_host: '""'
|
||
gateway_port: '"22"'
|
||
gateway_user: '"root"'
|
||
ssh_cmd: >-
|
||
"docker stop reposyncer_app;docker rm reposyncer_app;docker pull
|
||
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_reposync_group3:latest;docker
|
||
run -it -d \
|
||
-e CEROBOT_MYSQL_HOST='MYSQL_HOST' -e CEROBOT_MYSQL_PORT=3306 \
|
||
-e CEROBOT_MYSQL_USER=root \
|
||
-e CEROBOT_MYSQL_PWD='MYSQL_PASSWORD' \
|
||
-e CEROBOT_MYSQL_DB='reposyncer' \
|
||
-e BOOT_MODE='app' \
|
||
-p 8089:8000 \
|
||
--name reposyncer_app \
|
||
reposync:v2.0"
|
||
needs:
|
||
- docker_image_build_0
|
||
- ref: end
|
||
name: 结束
|
||
task: end
|
||
needs:
|
||
- gitlink_ssh_cmd_0
|
||
|