A single Bamboo plan is configured to build and deploy multiple applications.
Multiple Bitbucket repositories are linked to this Bamboo plan.
The plan is set to trigger automatically using the "Bitbucket Server repository triggered" trigger on any commit to any of the linked repositories.
The Bamboo job includes an SSH Task that:
Clones the repository source code
Creates a zipped package of the application
Uploads the zip as a build artifact
Previously, a static variable (bamboo.ProxyName) was used to specify the application name — this worked only when the plan was targeting a single application from a fixed repository.
This static variable has been removed, and the script now tries to use ${bamboo.planRepository} instead.
The problem is that ${bamboo.planRepository} and similar variables always reference the default repository, not necessarily the one that triggered the build.
Since multiple repositories are now linked to the plan, this causes:
The wrong repository to be cloned
The wrong application to be built or deployed
A solution is needed to dynamically identify which repository actually triggered the plan so that the correct source code is processed in the script.
thanks
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.