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

标签 jenkins-pipeline tekton tekton-pipelines

我有一个我想要的管道:

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

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

    相关文章:

    tekton - 将 ENV 变量从一个 Tekton Task 步骤传递到下一个步骤?

    Jenkins 管道 : Why is CPS Global Lib not loading?

    Jenkins 日志解析器

    linux - java.lang.NoSuchMethodError : No such DSL method 'bash' found among steps 错误

    jenkins - 如何使用 GitHub Org 插件从 jenkins 管道 (jenkinsfile) 触发另一个作业?

    dashboard - 执行基于 maven 的端到端测试并在 Tekton Dashboard 中显示结果

    kubernetes - 如何等待 tekton pipelineRun 条件