我有一个我想要的管道:
我希望第 3 步中的拆卸任务运行 不管 测试是否通过或失败,在第 2 步。据我所知 runAfter如果前一个任务成功,则只运行一个任务。
我试着调查 Conditions ,但是好像找不到例子……
我可以使用的其他任何东西或有人可以指出我的一些例子吗?
最佳答案
“最终”条款在 Tekton Pipelines 中实现(20 年 4 月)
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: pipeline-with-final-tasks
spec:
tasks:
- name: pre-work
taskRef:
Name: some-pre-work
- name: unit-test
taskRef:
Name: run-unit-test
runAfter:
- pre-work
- name: integration-test
taskRef:
Name: run-integration-test
runAfter:
- unit-test
finally:
- name: cleanup-test
taskRef:
Name: cleanup-cluster
- name: report-results
taskRef:
Name: report-test-results
设计文档:设计文档:https://docs.google.com/document/d/1lxpYQHppiWOxsn4arqbwAFDo4T0-LCqpNa6p-TJdHrw/edit#
关于jenkins-pipeline - 失败后继续 Tekton 管道(类似于 jenkins 管道 catchError 行为),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61749975/