Bamboo repository, change detection, include files

Alejandro Guizar March 2, 2018

Hi, I want my Bamboo build plan to pick up changes to a specific subdirectory of my Bitbucket server repository, but it does not ever trigger a build.

The repository structure is:

/
base/
app1/
app2/

I have a build plan per subdirectory. The patterns I've tried are:

base/.*
^base/.*
/base/.*
^/base/.*

I've also tried the above, escaping the slashes '/' with a backslash '\'. No luck.

I've seen an examples document and several other community questions on the subject, but it is not clear whether the file names start with '/', or what I could be  missing.

Product versions:

  • Bamboo 6.3.0 build 60304
  • Bitbucket v5.6.1

Thanks in advance!

 

 

3 answers

2 votes
Angel Ruiz September 1, 2022

Documentation around this topic is very bad, In one place they tell you to use something like `foo.bar/**` and in the inline help of the field they tell you to use Java regex patterns where `**` is not allowed.

In order to detect only the changes in a particular sub-directory of your repo the regex should look something like `subdir\/.*`.

Cheers.

PS: I cannot believe that in this day and age Markdown is not supported for comments.

Michal Bryxí September 2, 2022

Oh that's cool. This is such underloved problem that in the meantime my company migrated away to different CI 🙃

Like Steffen Opel _Utoolity_ likes this
0 votes
Michal Bryxí January 9, 2020

Same, but different problem here. The build is triggered every single time no matter what I put in `File pattern` while using `Include only changes that matches`. The build happens every time.

Jeyanthan I
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 23, 2020

Could it be that the commit message has some extra special characters that are not visible and is escaping from the regular expression?

Perhaps enabling DEBUG to this class might reveal more information in your server log.

com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager=DEBUG
com.atlassian.bamboo.plugins.stash.events=DEBUG
com.atlassian.bamboo.plan.branch=ALL
com.atlassian.bamboo.build.strategy=DEBUG

 Cheers,
Jey

0 votes
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 4, 2018

Hi Alejandro! 

 

Regarding docs: https://jira.atlassian.com/browse/BAM-18487

About options really has been written:  https://confluence.atlassian.com/bamboo0603/git-938868551.html https://confluence.atlassian.com/bamboo0603/_planrepositoryincludeexcludefilesexamples-938868266.html

 

1. BTW, what do you think create 1 plan with condition using 

 

git diff --name-only <commit1> <2commit>

 Therefore you plan can be more complicated but include different scenarios. 

 

2.  Or let's try you use git sub modules. :) Hence you can forget conditions for your triggers.

 

 

Hope it helps

Cheers,

Gonchik Tsymzhitov

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events