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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

bamboo spec in specific branch

Good morning

I have a problem with Bamboo specs YAML.
The existing documentation is quite poor and I'm trying to make a certain plan run only if there is a commit on a specific branch (for example development) because if the commit runs on another (master) I want to launch a different plan.

How can I do it?

Thank you very much.

1 answer

Have you defined a separate section for that branch in the yaml file?

 

  branches:
    staging:
      - step:

Hi Steve.

 

Thanks for your reply.

I dont know how to do it. Could you provide me a little bit example?

 

Thanks a lot

Something along the lines of this will get you started

pipelines:
default:
-step:
name: Default stuff for non named branches
script:
- npm install
- npm test
branches:
branch1:
-step:
name: Run on Branch 1
script:
- echo "Running this on Branch 1"
- npm install
- npm test
branch2:
-step:
name: Run on Branch 2
script:
- echo "Running this on Branch 2"
- npm install
- npm test

Hi Steve, do you know how the above would look like in Java Specs? I am trying to find an example or the right commands with the Specs API but nothing yet.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

573 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you