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

Change Branches Triggers via YAML specs

Matt October 5, 2022

Hi,

I have been playing around with bamboo specs in yaml to manage our CI.

Now I just stumbled accross a setting that is there in the UI but does not seem to be accessible via the specs at least not in yaml.

Is there a way to change for a plan the settings of Branches -> Triggers (by default seems to be "Same as defined in parent") to "None. run new plan branches manually" when creating the plans via yaml bamboo specs ?

If not is there a way to accomplish the same result (i.e. only trigger the plans manually or at scheduled time)?

I skimmed through the documentation and could not find anyway to do so.

So far the branches part of my plan is:

triggers:
  - polling:
    cron: 0 0 21 ? * *
branches:
  create: manually
  delete:
    after-deleted-days: 2
    after-inactive-days: 5
  link-to-jira: true


but I would expect something like this (tried it and did not work :/):
triggers:
  - polling:
    cron: 0 0 21 ? * *
branches:
  create: manually
  delete:
    after-deleted-days: 2
    after-inactive-days: 5
  link-to-jira: true
  trigger: manually  <----- This matching the Triggers part of the Branches tab

Attached what I would like to see if created as expected:TriggersBamboo.png

Thanks!
Cheers,

Matt

1 answer

1 accepted

1 vote
Answer accepted
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 5, 2022

Hello @Matt

Welcome to Atlassian Community!

You have to use branch-overrides to achieve that. In the example below I'm assuming a default polling cron and a "Bitbucket Server Trigger" for the "master" branch (default) and an empty list for any other branches (.*), meaning no triggers at all.

branch-overrides:
- master:
triggers:
- bitbucket-server-trigger
- polling:
cron: 0 0 21 ? * *
- .*:
triggers: []

Thank you,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

Matt October 5, 2022

Hi, it seems to do the trick.

Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events