Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,464,130
Community Members
 
Community Events
176
Community Groups

Bitbucket API pipeline states

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

0 comments

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events