Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Enabling automatic build only on build plans created by means of Pull Requests

alessandro.violante March 14, 2024

Hi, 

Actually, in Bamboo, I've set the automatic creation of build plans linked to branches when I create a Pull Request for them.

However, sometimes, I create a branch but I don't need to create a Pull Request for it, and I create its build plan manually on Bamboo.

Actually, regardless of how the build plans linked to branches are created (automatically by means of Pull Requests or manually without Pull Requests), when the build plan is created, a build is automatically triggered, and, with each commit, a new build is triggered.

I would like to restrict the automatic builds trigger to the build plans created by means of Pull Requests.

If I create manually a build plan, I don't want that builds are automatically triggered, I want that builds are executed only manually.

Someone suggested me to use Webhooks, but I don't have enough administrative rights to configure them and at the moment I don't know anything about them.

Someone else suggested me to use the configuration I attach you in the ticket, but it doesn't work as expected.

In summary:

New branch -> Pull Request creation and automatic build plan creation -> Automatic builds

New branch -> Manual build plan creation -> Only manual builds, no automatic builds

How could this be achieved?

Thanks a lot in advance!

02-bamboo-branches-configuration.PNG01-bamboo-triggers-configuration.PNG

 

1 answer

2 votes
Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2024

Hello alessandro_violante,

Welcome to Atlassian community.

For the branch which is created manually you'll need to change the trigger type to below.

image.png

Regards,

Shashank Kumar

**please don't forget to Accept the answer if your query was answered**

alessandro.violante March 18, 2024

Hi,

Thank you, is it the only way to do it or could it be done automatically for each branch created manually?

I ask it because, if I use the solution you have provided me, everytime I create a new branch without creating a Pull Request, I should edit its configuration.

Best regards,

Alessandro

Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 18, 2024

Hello Alessandro,

When a new Branch is created from the main(master) branch it inherits all it's properties including Triggers.

You can always set the Trigger of the main(master) branch as manual, but then the branches which are automatically created would also be having this trigger which you don't want.

The only option I can think to work with is branch override functionality, but to use that you project and plans should be managed via Bamboo Specs ( You cannot update those plans via GUI )

if you are okay with that I guess I can provide you few options to work with, need to test few things myself.Let me know your opinion.

Regards,

Shashank kumar

Like Steffen Opel _Utoolity_ likes this
alessandro.violante March 18, 2024

Thanks a lot, I'll ask about it and let you know!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events