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?

Harshal Shah
  • 587
  • 4
  • 14

2 Answers2

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

dschulten
  • 2,994
  • 1
  • 27
  • 44
Josh Zarrabi
  • 1,054
  • 7
  • 15
0

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

danilopopeye
  • 9,610
  • 1
  • 23
  • 31
Paul M
  • 290
  • 2
  • 12