Sharing tasks between Bamboo jobs?

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

Weird, no responses

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

23,452 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you