Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

how to use bamboo api to retrieve the current status of a deployment project?

I need to use bamboo API to retrieve the current status of a deployment project, it should be able to return something like:

isBuilding/isDeploying: true/false

I don't need the latest result of a deployment.

2 answers

1 accepted

0 votes
Answer accepted

You can retrieve the current status of a deployment environment from the Bamboo REST API via a GET to /deploy/environment/{environmentId}/results:

The response contains related properties such as 'deploymentState', 'lifeCycleState', 'queuedDate' etc. - in particular, 'lifeCycleState' should offer what you are looking for, with values such as 'IN_PROGRESS' and 'FINISHED'.

WOW!

 

That is exactly I want! Amazing! Thank you for your prompt, valuable and accurate answer, Steffen!

Glad it helps @IanYifanChan - please also 'accept' my answer as solution via the checkmark on the left side so that it doesn't show up as unanswered anymore, thereby keeping others and myself focused on and motivated to assist with new questions :)

@IanYifanChan FYI , we required some similiar functionality recently , and we ended up scripting all the REST Calls.   I posted a Gradle example at https://gist.github.com/vicsz/b04c31f27a91b0d32b55b1bf718ab705  

@IanYifanChan , could you please how di you implement this " /deploy/environment/{environmentId}/results:" API call. Thank you

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

46 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you