Get rid of multiple bamboo assembly plans

I have Atlassian Bamboo and several (about 50) git repos. All repositories have the same plan. Should I have 50 plans to build 50 repositories? Of course, every plan is a clone.

I need to develop a build and deployment plan. Is there a way to maintain fewer plans and work with multiple repositories?

Note. The individual repo will be built separately.

+3


source to share


1 answer


If you want to use a single plan, you will have to run that plan with webhooks / git hooks from each of your repositories for every commit it receives. This means that every time any of the repos notices that changes have been pushed, they notify bamboo that the build plan has been completed, and also set a variable in bamboo that stores which git repository was modified.

Here is the rest of the documentation where you can find how to run the bamboo plan remotely. https://docs.atlassian.com/bamboo/REST/4.0/#idp263696

You will need to define a planetary variable to hold the repository name / url and other information, which is a repository similar to the branch name in the git repository from which the bamboo build function is called. Set this variable using the bamboo API. Once installed in Bamboo, you can run a shell script task to run git clone <${bamboo.git_url_variable}>

that will clone the repository. After this step, you can complete the rest of the bamboo build tasks in order to work in this repository.



Don't use bamboo related repos and disable any default bamboo triggers for the implementation above.

My guess is that there is no harm in using separate plans for all repositories if they produce different artifacts, in fact you should use separate plans for different sources. Managing multiple plans is easy if you manage them using plan templates, which means converting them as source code. More details here https://jira.atlassian.com/browse/BAM-907

Planning templates help you manage changes to all your plans in one shot

+2


source







All Articles