大厅:无论故障状态如何都可以运行所有任务

发布于 2025-01-09 11:43:58 字数 65 浏览 3 评论 0原文

想知道单个作业中是否有用于大厅任务的任何标志/选项,以便无论任何任务失败,所有任务都会被执行。

谢谢!

Wanted to know if there is any flag/option for concourse tasks inside a single job so that all tasks gets executed regardless of any task failing.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夏见 2025-01-16 11:43:58

完全。默认情况下,任务按顺序运行。如果您希望它们独立于序列运行,请将它们放在 in_parallel 键中,如以下管道所示:

jobs:
  - name: parallel-tasks
    plan:
    - in_parallel:
      - task: failing-task
        config:
          platform: linux
          image_resource:
            type: docker-image
            source:
              repository: alpine
          run:
            path: /bin/sh
            args: [ "-c", "exit 1"]
      - task: passing-task
        config:
          platform: linux
          image_resource:
            type: docker-image
            source:
              repository: alpine
          run:
            path: /bin/sh
            args: [ "-c", "exit 0"]

运行它将产生以下输出:
并行任务

in_parallel 适用于任务和资源(例如并行运行 get

Totally. By default, tasks run sequentially. If you want them to run independently of the sequence place them in the in_parallel key, like in the following pipeline:

jobs:
  - name: parallel-tasks
    plan:
    - in_parallel:
      - task: failing-task
        config:
          platform: linux
          image_resource:
            type: docker-image
            source:
              repository: alpine
          run:
            path: /bin/sh
            args: [ "-c", "exit 1"]
      - task: passing-task
        config:
          platform: linux
          image_resource:
            type: docker-image
            source:
              repository: alpine
          run:
            path: /bin/sh
            args: [ "-c", "exit 0"]

Running it will produce the following output:
parallel tasks

in_parallel works with tasks as well as resources (e.g. running get in parallel)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文