0

how to determine current build status (SUCCESS, FAIL) within a custom build step script

I'd like to have a script like this:

if [[ %build.status% == "SUCCESS" ]]
  curl http://example.com/success
else
  curl http://example.com/fail
fi


but I see no way to retrieve the current build status from within a build step. Is there a way to accomplish this? Alternatively is there a way to set the step execution policy to "Only if previous step was NOT successful"?

0 comments

Please sign in to leave a comment.