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
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I have a configuration of a repository with a java build spec and multiple other repositories with source code. The build specs generate similar build plans for each repo.
I want to have traceability between the build results of each repo and the version (e.g. the commit id) of the build spec used to create the build plan.
How to realize this traceability?
I was thinking of setting a plan property when the buildspec is run, but how to retrieve its commit id?
Another starting point would be to somehow add a build step, querying the last successful build of the java spec.
Hello @Erwin K_, welcome to Atlassian Community!
You can use the bamboo.planRepository.<position>.revision variable to retrieve the revision id for that commit. The <position> starts on 0 and depends on how your Specs repository is ordered on the Plan.
To automate that, you can script something that would scan all environment variables named bamboo.planRepository.<position>.<name>, where <name> is your Specs repository, then strip the <position> from it and reuse it as the <position> on bamboo.planRepository.<position>.<revision>.
Optional: Once you have the revision you can create a text file with the variable=value format and reuse it across multiple Jobs if required:
Kind regards,
Eduardo Alvarenga
Atlassian Support APAC
Thanks this has been useful!
Previously I only had the code repo linked to the plan. By adding the specs repo to the plan as well, it can be accessed to retrieve the last commit.
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.