提交 0074da21 编写于 作者: yin-zh's avatar yin-zh

cicd test1

上级 8447c558
# 在所有的任务之前执行
before:
link: '{{chapter_2_url}}'
transitions:
action:
- type: choice
with: ready.md
to: step1
# 任务列表
step1:
link: '{{chapter_2_url}}'
description: '编程作业'
transitions:
events: ['note_events']
action:
- type: choice
- with: code.md
to: step2
step2:
link: '{{chapter_2_url}}'
description: "代码提交"
# 这里要开始监测 ch1 分支的代码提交,同时判断 CI 的结果,Chapter1 是提交截图
transitions:
with: 'ch1'
events: [ 'push' ]
action:
- type: create_pipeline
with: 'https://codechina.csdn.net/-/snippets/318/raw/master/.gitlab-ci.yml'
store:
ch2_test_url: '{{result.data.html_url}}'
ch2_test_id: '{{result.data.id}}'
- type: issue_comment.created
with: commit_ci_run.md
to: step3
step3:
link: '{{chapter_2_url}}'
description: "代码提交"
# 判断CI结果,成功的话提示下一步,失败的话重新coding
transitions:
- with:
events: [ 'pipeline' ]
left: 'failed'
operator: '='
right: '{{object_attributes.status}}'
action:
# CI未通过提示
- type: pipeline_result
with: '{{ch1_test_url}}'
- type: issue_comment.created
with: commit_ci_error.md
to: step2
- with: '{{ch1_test_id}}'
events: [ 'pipeline' ]
left: 'success'
operator: '='
right: '{{object_attributes.status}}'
action:
# CI 通过提示
- type: pipeline_result
with: '{{ch1_test_url}}'
- type: choice
with: commit_ci_done_option.md
to: step4
step4:
link: '{{chapter_2_url}}'
# description: "完成当前章节学习"
transitions:
events: [ 'close_issue' ]
action:
- type: issue_comment.created
with: end.md
to: end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册