You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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!
Pipeline execution log below: https://bitbucket.org/snippets/dpalmisano/Argb7