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
Next: Root
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
Hi All,
I recently wrote a quick python script to trigger our Bitbucket pipelines from our Jenkins builds. One of the things I found frustrating was the lack of useful documentation for the bitbucket API around pipelines. The basic APIs were documented adequately for the most part, but the return values of any given API call were basically all missing (for example, go to Bitbucket Pipeline API -> Get a pipeline and and then click on the Response Object "Pipeline", and keep following it down to "state". You get nothing!)
Interestingly, the best documentation I found was a github repo where someone seems to have created a python client based on the Open API spec for Bitbucket. They don't list all the return states anywhere either, but they have stubbed out the classes for the everything with somewhat useful comments about the various states of both pipelines and pipeline steps.
To help others who may need to do something similar in the future, here's the github repo, and a list of pipeline and pipeline step states:
Github repo: https://github.com/magmax/atlassian-openapi/blob/master/spec/bitbucket.yaml
Pipeline states:
COMPLETED
ERROR
EXPIRED
FAILED
IN_PROGRESS
PAUSED
PENDING
RUNNING
STOPPED
SUCCESSFUL
Pipeline Step States:
COMPLETED
ERROR
EXPIRED
FAILED
IN_PROGRESS
NOT_RUN
PENDING
READY
STOPPED
SUCCESSFUL
I may have missed some, I'm not entirely sure. I compiled these lists by grepping through the models/* directory for state info.
Hopefully someone finds this info useful.
--
Paul