Highlighted

Bitbucket Pipeline execution showing success when is not supposed to do so

Dear all,

I'm struggling a bit with an issue with Bitbucket Pipeline.

I have a pipeline that runs a Python script. This script basically starts a web server (using subprocess) and calls few HTTP endpoints exposed by this web app. In order to work properly, we need my_init running in our Docker container.

We artificially made the script to return a non-zero exit code but Bitbucket Pipeline still terminates the execution as a successful one.

We noticed that this behaviour happens only when my_init is running in our pipeline Docker container.

It seems that somehow, my_init prevents Bitbucket Pipeline to grab the correct exit code of the script.

This behaviour happens regardless my_init is started: we tried to start it as a step of the Pipeline, or within the Python script.

We tried to run an alternative python script that mimics the actual one, with the difference that my_init is not involved and the Pipeline execution definitely matches the return code of the script: failure when the script raises an exception, success when the script returns a zero code.

 

Any help will be really appreciated!

Thanks

Pipeline execution log below: https://bitbucket.org/snippets/dpalmisano/Argb7

0 comments

Comment

Log in or Sign up to comment
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 06, 2018 in Bitbucket

Do you use Bitbucket Cloud and Jira Cloud? If so, let us know!

Hi Community, I'm Julia and I'm on the Jira Software Cloud marketing team!  We're looking for companies or teams using Bitbucket Cloud and Jira Software Cloud. If your team fits the t...

174 views 6 3
Join discussion

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