gpt4 book ai didi

jenkins-pipeline - 失败后继续 Tekton 管道(类似于 jenkins 管道 catchError 行为)

转载 作者:行者123 更新时间:2023-12-04 02:36:07 37 4
gpt4 key购买 nike

我有一个我想要的管道:

  • 提供一些资源,
  • 运行一些测试,
  • 拆资源。

  • 我希望第 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/

    37 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com