Concourse : multiple steps on_failure
Asked Answered
S

2

7

Is it possible to execute multiple tasks from on_failure in concourse? I could not find an example in documentation or elsewhere I'd like to do something like

on_failure: - aggregate: - put: slack-notification - put: mark-pr-as-failed Is this possible or should I create a new task combining both steps above?

Signature answered 3/8, 2018 at 12:53 Comment(2)
Hello Harshal, the answer below is correct. Please accept it.Egghead
Accepted the answer. Thanks for the quick response.Signature
B
11

You can accomplish this using the do step.

Here is an example in our pipeline: https://github.com/cloudfoundry/infrastructure-ci/blob/ad5e3a717bb191a09c99756ecbc158622e1caf9e/pipelines/bosh-bootloader.yml#L1970-L2001

Blowing answered 3/8, 2018 at 17:47 Comment(2)
link fix for do operator: concourse-ci.org/jobs.html#do-stepCutthroat
yet another link fix für do step: concourse-ci.org/do-step.htmlHydrogeology
B
0

You could also use the "try" step so as not to fail the step at all?

Bravo answered 17/5, 2019 at 10:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.