Fastlane Step result

How can I get the result of a fastlane step?
I’d lilke to know, by a variable, if the previous step is failed or not.
Thank you

1 Like

Great questions!

The env var you’re looking for is BITRISE_BUILD_STATUS - http://devcenter.bitrise.io/faq/available-environment-variables/

current status of the build - “0” if there are no failed steps yet, “1” if there’s at least one failed step

Additionally if you want to run a step (e.g. a Script) even if a previous step failed, you have to mark the step with run_if: true - related docs: http://devcenter.bitrise.io/tips-and-tricks/disable-a-step-by-condition/

The default behavior of (most) steps is to only run if there was no failing step in the build before that.

You can also expose custom environment variables from fastlane (or any other script/tool) too, you just have to do it through envman - see: http://devcenter.bitrise.io/tips-and-tricks/expose-environment-variable/

Awesome! Thanks :slight_smile:

1 Like