Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

What is the Bamboo equivalent of a Jenkins matrix job?

Brian Mingus October 2, 2013

We have some Jenkins jobs that are matrix jobs. This allows you to specify a vector and to then substitute that variable throughout the job. All parameterizations are run in parallel.

This prevents you from having duplicate code when the steps you run on many different platforms are similar, for instance. i.e., we have just one job for running slightly different code on iphone, android, flascc, ios, mac, linux and windows. We manage the differences using the Jenkins Conditional plugin to enable or disable steps based on the platform variable. The platform variable also determines which kind of agent to run the job on. i.e., if the platform is android then that job is run on m64android.

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
devpartisan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 11, 2015

Having been a Jenkins user in a previous life, I've been burned too often by putting too much logic into the CI configuration, instead of into a build script. In my experience, CI configurations are much harder to debug because you cannot run them without the whole overhead of the CI server/agent infrastructure. I strongly recommend pulling those conditional steps into the build script. Then let the the CI server be responsible for sending in the right build parameters. In case you think I'm just trying to make an excuse for Bamboo, ThoughtWorks recommends holding on "programming in your CI/CD tool" in their January 2015 Technology Radar.

If you have a parameterized build script, then you can leverage Bamboo's notion of capability. For the example you described, you might have one agent on OS X, one on Windows, and one on Linux. You give each agent a custom capability like: my.platform=osx, my.platform=windows, my.platform=linux. Then you call your build script with the capability as a variable. That would look like ${bamboo.capability.my.platfrom}. Note the capability has to be passed as part of a Bamboo task per this question, not embedded in your script. Then tell Bamboo to run the build plan on all 3 agents. The result will be parallel execution across the matrix of platforms.

This is not a perfect analog to Jenkins matrix jobs but it is suitable for the use case above, where there are different environments on each agent. If you have a different use for matrix jobs, it would be helpful for us to hear the details.

2 votes
xtjhin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 10, 2015

Unfortunately, that is not currently possible in Bamboo. There is an open feature request for this https://jira.atlassian.com/browse/BAM-5813

TAGS
AUG Leaders

Atlassian Community Events