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

0 vote

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 Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

699 views 0 4
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot