Conditionally Skip Tasks in Bamboo Build

Justin Frost November 16, 2014

I have a release build plan which is manually executed when we want to create a release.  There is one parent project and a bunch of child projects.

The plan build each child project if required and then builds the parent project using the latest available version of the child projects.

To make this work I need to conditionally skip the remaining tasks of a child project build if there are no changes. I do not want to fail the build, as no action is required.

I have setup a script task to compare svn revisions and if the same I want to skip all other tasks without failing the build.

 

4 answers

3 votes
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 18, 2014

You can't do it in Bamboo. The only way is to change all your tasks to script tasks and have the condition in the script.

2 votes
Bo Chen October 11, 2016

thanks Justin for asking this question and thanks Przemek for answering it. 

we have run into similar situation. We have to create 2 plans for the same repository, one for build only, the other one for build and deployment. The reason behind is that we have a delicate build server and we can't flood it with too many build packages.

It looks to me a legitimate requirement to have conditional build tasks, i.e. skip a job/task when a certain condition holds true. I believe there are enormous use cases for this feature. However, as Przemek mentioned, it's not currently supported.

Is there any particular reason why Bamboo doesn't want to do this, or, it's just a feature nice to have, but the engineer team doesn't have time. 

Also , we try to avoid having duplicated build plans for different deployment settings (there is a maintenance overhead to syn those duplicated plans). if you any suggestions, please let us  know. thanks!

 

1 vote
Phil Rittenhouse January 17, 2017

Does a feature request exist for this?   I would vote for it

 

0 votes
Bharath January 25, 2019

Use this plugin to conditionally skip tasks.

https://marketplace.atlassian.com/apps/1219706/conditional-tasks-for-bamboo?hosting=server&tab=overview

You can skip tasks based on a Variable or Username

This plugin works only on bamboo 6.7.0 or higher.

Phil Rittenhouse January 29, 2019

Thanks Bharath!  Unfortunately we are still running 6.3 so I'll have to wait until we upgrade before I can give it a try.

The documentation link takes me to a bitbucket repo but I don't see anything more than the license.  Do you have any examples to get people started?

Bharath February 18, 2019

Hi Phil,

Yes I know there is no documentation, that's annoying.

But using this is pretty simple.

Just while configuring the tasks, there appears a check box named Conditional task, check that.

And then you can configure it to conditionally execute based on a Variable or Username

Shyju Eswaramangalath July 25, 2019

Hi,

Is this feature available we are on bamboo version 6.9.1 and it is not working with various options I've tried, can you give me any example or send us any screen shots.

 

with regards

Shyju

Jeyanthan I
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 3, 2020

Hey Shyju,

I see there is some information in the README file of the respective repository here: https://bitbucket.org/atlassianlabs/bamboo-conditional-tasks/src/master/.

Hope that helps.

Cheers,
Jey

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events