Bamboo YAML Specs to validate feature branches Pull Requests

Julio Carlos Barrera September 4, 2019

Hello.

 

In our organization we have Bamboo server 6.8 and Bitbucket server v5.16. I've just discovered Bamboo YAML Specs, and I love the idea, because I'm very used using Jenkins with Jenkinsfile, Travis with travis.yml file or CircleCI with config.yml file. I prefer this approach over Bamboo Java Specs to be language independent and for simplicity.

 

My particular use case is feasible with the other platforms I mentioned: I want to execute a build process, including testing for any feature branch in order to have a verification step for every new Pull Request.

 

With current implementation of Bamboo YAML Specs I don't find the way to do that. What I have explored:

  • I explored and tested Linked repositories of Bamboo to execute my Bamboo YAML Specs, and I agree with this comment in other community thread. I expect to have a linked repository, not specifying a branch, I don't foresee why one must specify the branch.
  • I have read about "Divergent plan branches", and tried to follow this discussion of the community. I would like to have plan branches in YAML Specs too. Hopefully we will have it soon :)
  • I have seen this plugin, but I don't know if it would help me. I need to try a lot of more things.

I'm a bit lost. May you give me any hint or proper documentation where I could find valuable information to get my use case done? I will appreciate it a lot.

 

Thank you!

2 comments

Julio Carlos Barrera September 18, 2019

I know I didn't do a very specific question, but the lack of documentation or community activity discourages me of using Bamboo and I decided to move to alternatives like Jenkins as our CI/CD tool. It is very easy to get the use case I described done with it.

Victor Debone
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 18, 2019

Hello @Julio Carlos Barrera

This is not very timely answer for your question but I'd be happy to help you more if you're still considering options.

You want to execute a build process in Bamboo for every pull request you make in your repository, is that correct? I assume these are not forked repositories, but just branches inside the same repository trying to get merge. Also, may I ask if there are any different build processes for different branches?

Julio Carlos Barrera September 18, 2019

Hi Victor. Thank you for your friendly approach. I have 3 main requirements:

  1. I want that every single PR in any feature branch in my Bitbucket server, launches a build. It should include tests. Not forked repos, branches in the main repo. Build process should be the same for all of them.
  2. I want that the build process is defined inside the code, because it is a responsibility of the developers to create and maintain it. This is the reason I like Bamboo YAML specs file (or any other alternatives, like Jenkins files, Travis or Circle CI as I mentioned).
  3. I want to see the result of these build processes in the PR view.

I know I can more or less achieve it with manual defined Plans in manual created projects in Bamboo. But I want to get the possibility to define it in the code in an universal way, from the source code. That's the reason why I explored Bamboo YAML specs, but I'm very stuck trying to achieve my goals.

From a company point of view, I like the ability of Atlassian product to integrate. An example is the way we use Jira and Bitbucket server, very seamless way.

Victor Debone
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 18, 2019

Ok :) I'm sure this is achievable using Bamboo Specs YAML. The documentation is misleading and I will make sure to address this.

With YAML Specs you are able to run builds on multiple branches of the same repository with the same configuration. The documentation mentions that it doesn't support Plan Branches because you cannot alter the default configuration that it provides, but the default configuration of Plan Branches in YAML Specs is that it will detect different branches from your repository and run the build that you configure on the YAML Specs on the master branch.

The overarching Divergent Branches feautre that you probably encountered being mentioned in multiple places is not related to the capability of running the builds from multiple branches, but having each of these branches running different configurations. YAML Specs still cannot run different builds for different branches on the same repository.

For the Pull Request, once you create an Applink between Bitbucket Server and Bamboo, it will be shown in the linked repository. You can check more information here.

I hope I've clarified your doubts :)

Like Steffen Opel _Utoolity_ likes this
Julio Carlos Barrera September 19, 2019

Hi Victor.

 

Thank you for your feedback. More or less I followed all the steps you told me, but I didn't get it completely working. I only get working the build of the branch I specified in the "Linked repository" configuration of Bamboo but not in any other. I miss some real examples in the documentation, because in the YAML Specs docs there are only silly examples very difficult to extend to real use cases.

 

Thank you.

Victor Debone
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 19, 2019

I think the answer for that is a bit off from your original question and is a troubleshooting question I'd be happy to answer via email. You can contact me at vdebone@atlassian.com and I can continue helping you out on how to make it work.

I will re-answer you question for future reference.

Edit: I've just noted this is not a "question" but a "discussion topic", hence probably the previous comment doesn't really apply and we can continue here with the comments. I will keep the root comment for future reference still.

I assume you're using Bitbucket Server repository. Was the linked repository created a fresh repository, and when you committed code to a new branch, it didn't build? Can you manually create a branch in the plan from this branch? You can do that using this tutorial under "Building every branch the easy way".

Like Steffen Opel _Utoolity_ likes this
Victor Debone
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 19, 2019

 

Hello @Julio Carlos Barrera :) I'm sure this is achievable using Bamboo Specs YAML.

With YAML Specs you are able to run builds on multiple branches of the same repository with the same configuration. The documentation mentions misleads by telling that it doesn't support Plan Branches. What it doesn't support is the configuration of Plan Branches. The default configuration of Plan Branches with YAML Specs has the detection of different branches from your repository turned on. Bamboo will run every branch from the repository with the YAML Specs you have on the master branch.

The overarching Divergent Branches feature that you probably encountered being mentioned in multiple places is not related to the capability of running the builds from multiple branches, but having each of these branches running different configurations. YAML Specs still cannot run different builds for different branches on the same repository.

For the Pull Request, once you create an Applink between Bitbucket Server and Bamboo, it will be shown in the linked repository. You can check more information here.

I hope I've clarified your doubts :)

Like Steffen Opel _Utoolity_ likes this

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events