Is it possible to disable a build step in bamboo for a branch plan

I have a build plan that by default has a build step that pushing a build component to a deployment tool called urban code deploy.  Typically we only "build" CI related branches ... develop and release.

 

I have had some developers ask to build feature branches, but I do not want to push the built asset to my deployment tool repository because I will never deploy builds to my target servers from feature branches.  Is is possible for me to disable a build step for a given branch plan?

1 answer

It would help if you provided some details on which task you are trying to disable for feature but from Bamboo point of build plans, I don't think you can automate the plan to disable a task for feature branches and run for other branches

That being said, I do have an alternative for you to consider. All tasks you do using plugins can be done in script task. So, I would consider using the script task and have this condition:

if [[ ${bamboo.planRepository.branchName} =~ feature* ]]

echo Not performing push to deployment tool

else

Your task to push build asset to deployment tool

 Get bamboo variable for plan branch and match the keyword for your feature branch in a if else condition

Thank you for your reply.  It is a script and I was in the process of implementing the same solution.  I do appreciate your feedback.  It would be a nice feature to be able to disable certain build tasks based upon a branch plan.

 

eric

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
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,568 views 0 6
Read article

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