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
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
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:
Atlassian Support APAC