Run script/set env when specific step failed

#1

Hi,

I know it’s possible to run a step if the build failed.
But I want to know which step failed when they’re skippable so I can bundle it and post it to slack.

example:

  • step: code analysis -> failed

  • step: tests -> succeed

  • step: lint -> failed

  • step: slack (:x:analysis :white_check_mark:tests :x: lint)

So is it possible to set and ENV after the step failed or to run a script or something?
This way I can read the ENV and set the message for slack)

Friendly regards,

Seppe

0 Likes

#2

Hi @seppe_r!

We don’t think this is possible for now, but this is definitely #feature-request material! Although it’s a bit of a rare use case, exposing variables for failures could help with this I think!

0 Likes