Run script/set env when specific step failed

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

1 Like

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!

I need something like this too.
I’m thinking to hack this with additional steps setting an environment var with some information.
Then, into final, we can put a step with script to handle all these information.