How to do Post build scripts for pipeline?

After running our selenium test for our site, it would either generate a passing or failing report. If a test is already failing, then the build will already stop. Is there a way to do a post build script where it will run regardless if the build fails or pass and get the output of from the pipelines result?

1 answer

This widget could not be displayed.

Hi John,

There is a feature request for multiple steps that would allow you do this - you can follow it here:


As a workaround, you can add 

<test command> || true

to continue the build and execute a script.

The caveat of course is the build won't reflect the correct status.

Hi Davina,

I will try the work around you've suggest. My only concern is that the test is done so if it fails it won't continue deploying a bad code to the next environment. That's why a post build script would be great so we can setup getting of reports and sending it to people. Anyway, the multiple step might be the feature we really need for this. Hopefully we can have this asap. Thanks!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,317 views 8 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you