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
Community showcase
Published Monday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

396 views 0 8
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