How to check status of the current build in a Script step?

Hi there,

I would like to run a script step after my Gradle step runs that checks whether the build succeeded or not and do some work in either case. Is there a way to access that information from a Script step? I see the .isBuildFailed check from .yml world but unsure how to access the same type of variable from Bash.


I just realized I missed the ENV variable for this. Sorry!

1 Like

Not problem - indeed you can get this info from the $BITRISE_BUILD_STATUS environment variable (related docs:

If you’d have any questions just let us know!
Happy Building! :slight_smile: