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
We are a Atlassian Shop. We use Bamboo, Bitbucket, Confluence and Jira. I am trying to find out which commit/commits are associated with particular build.
I am trying to find out what Bitbucket commit is associated with my Bamboo Build.
http://<base url>/rest/api/latest/result/<build key>
It retrieves information minus commit. I see the commit information through the GUI.
Is there an API that can retrieve the commit information ?
thanks
Hello @Naren
Welcome to Atlassian Community!
To find the associated revision (commit/PR) for a nominated build you can use the following API syntax:
/result/{projectKey}-{buildKey}-{buildNumber : ([0-9]+)|(latest)}?expand&favourite&start-index&max-results
Then look for the value of "vcsRevisionKey".
https://docs.atlassian.com/atlassian-bamboo/REST/8.1.3/#d2e4105
For example, considering my project is ABC, the plan is NOP and Build is 31:
$ curl -k -s -u admin:admin -X GET -H "Accept: application/json" https://bamboo.mydomain.net/rest/api/latest/result/ABC-NOP-31 | jq -r ".vcsRevisionKey"
2c357d05bac57c09bdc588f5380d8fff25bf8693
Regards,
Eduardo Alvarenga
Atlassian Support APAC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Naren please let us know if we can go ahead and close this thread by accepting this answer as a solution for this case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.