cicdtest/.devops/示例demo.yml

66 lines
1.5 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: 2
name: 示例demo
description: ""
global:
concurrent: 1
trigger:
webhook: gitlink@1.0.0
event:
- ref: push
ruleset:
- param-ref: branch
operator: EQ
value: '"master"'
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://gitlink.org.cn/cloudream/cicdtest.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 1
needs:
- start
- ref: gitlink_scp_resource_0
name: scp复制文件支持跳板机
on-failure: ignore
task: yystopf/gitlink_scp_resource@0.0.7
input:
ssh_private_key: ((SSH.pcm1))
remote_host: '"123.60.146.162"'
remote_port: '"22"'
remote_user: '"pcm"'
remote_file: '"/home/pcm/test1"'
local_file: git_clone_0.git_path
gateway_host: '"120.46.183.86"'
gateway_port: '"22"'
gateway_user: '"pcm"'
temp_file: '"/home/pcm/test1/cicdtest"'
needs:
- git_clone_0
- ref: ssh_cmd_0
name: ssh执行命令
task: ssh_cmd@1.1.0
input:
ssh_private_key: ((SSH.pcm1))
ssh_ip: '"123.60.146.162"'
ssh_port: '"22"'
ssh_user: '"pcm"'
ssh_cmd: '"
cd /home/pcm/test1/cicdtest
&&
chmod +x build.sh
&&
sh build.sh "'
needs:
- gitlink_scp_resource_0
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0