The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Sharing tasks between Bamboo jobs?

Sean Wilson
September 17, 2012

We're trying to evaluate how we can use Bamboo to automate building, testing and deployment of our projects. For one project, we have several Git branches for the project where the jobs we want for each branch have a lot in common but some differences. What strategies are there for sharing common tasks between jobs in Bamboo?

As an example of the sequential tasks needed for each branch:

Development branch - Checkout, Run build script with development flag set, Run Sonar, Run JUnit report parser, Deploy to development environment

Feature branch - Checkout, Run build script with development flag set, Run JUnit report parser

Master branch - Checkout, Run build script with production flag set, Run Sonar, Run JUnit report parser, Manual task that requires manual testers to approve before continuing, Deploy to production environment

Ideally, we don't want to be cloning the tasks for each branch job as if we need to tweak alter or add tasks, we'd have to manually keep the common parts in sync and might make mistakes. I'm aware of the multiple branch support Bamboo has as well as the ability to use conditions in scripts that depend on Bamboo variables (e.g. like the current branch name). I have problems seeing how you can make e.g. a Maven task conditionally run (unless you switch to using a script task for this instead) and how the manual task will only apply to the master branch job.

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Mike Smith
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 14, 2015

bump

0 votes
Clyde Tedrick
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 24, 2015

Weird, no responses

TAGS
AUG Leaders

Atlassian Community Events