Hi,
I have a linked repository with 3 folders in it.
I'd like to make 3 different build plans for those 3 folders.
I'm trying to make it so Bamboo only triggers build on pull request for Folder2, but no pattern works.
"Include only changes that matches to the following pattern"
Folder2/
/Folder2/
Folder/.*
Folder2*
etc, etc.
Is this feature just broken? What I doing wrong?
Should we use .yaml instead?
Thank you.
Hello @Jonas Gucu
Welcome to Atlassian Community!
You need to use a regular expression for that to work. E.g:
The regex above will match any commits made to any files at any level from the "Folder2" folder.
More interesting examples here:
Sincerely,
Eduardo Alvarenga
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
This does not work.
I make changes to a file in Folder1, make a pull request, but the build for Folder2 gets triggered.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jonas Gucu
Sorry to hear it is not working for you, but it does work if configured correctly.
You will have to review the repository and trigger settings on each Plan and confirm if they are all pointing to the same Repository in Bamboo.
If they all share the same repository and that repository has specific Change Detection options with include patterns, it should work.
Regards,
Eduardo Alvarenga
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello again,
I double-checked everything.
There are 2 linked repositories pointing to the same bitbucket repository.
The repository contains 1 solution with 3 folders. The first two folders contain UI projects with other class library projects.
In one of my linked repositories I have written a Change detection option -> File pattern like the one you have written above ^Folder2\/.*
I checked plan configurations for both repositories. Both of them have triggers, look at the appropriate linked repository and "Create plan branch" is set to "When pull request is created".
I change a class file in Folder1, make a Pull Request and BOTH of the plans get triggered, even though the second plan has a file pattern that should only trigger when something in Folder2 gets changed.
So it does not work. Can you suggest what else I should check? Is this something wrong with Bamboo version, or configuration, or anything else?
We are using "Atlassian Bamboo version 8.0.0 build 80008 - 29 Jul 21".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jonas Gucu
Thank you for the detailed explanation. The issue is not related to the Regex or Change detection options. As you have explained better, you are creating a Pull Request. Bamboo will run a build regardless of any settings when it receives a notification for a new PR.
Please have a look at the following Community thread for a workaround and also a Feature request where you can vote so our developers can be aware of what needs to be implemented.
Cheers,
Eduardo Alvarenga
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Eduardo Alvarenga
Sorry for not writing a detailed explanation at first :)
I don't see how that thread helps me to be honest.
So what are the change detection options for then? And is there no way to achieve what I'm trying to do?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jonas Gucu,
Running the first build when a Plan Branch is created is Bamboo's expected behaviour and there is no way to prevent that from happening.
That is documented on the https://jira.atlassian.com/browse/BAM-12944 feature request which you can watch and vote on to have it implemented.
As explained on the linked community thread, you can add a "dummy" task as the first Task to the First Job of your Plan and use it as a workaround to avoid the full build from happening when you create a pull request and consequently the Plan branch is created.
Any other pushes to the same branch that is part of the same Pull Request will be avoided by the Repository's Change detection options and their Regular expression includes/excludes.
Regards,
Eduardo Alvarenga
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
So as I understand there is no way to achieve what I want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.