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

Cannot get repository change detection working

jay_vee March 26, 2024

I have been trying unsuccessfully to get change detection working in a plan. I am using YAML Specs. My repo config is below.

I have tried different filter patterns and am now just trying to get it to work with a single file. Once I can get this working, I'd like to be able to get this to run on a change to anything in :

- dir1/product/** (needs to be recursive)

- dir2/product/** (also recursive)

I have been trying with patterns similar to **/product/**

I have removed all linked repositories and am only including a plan repo. I have noticed that updating my plan repo file-filter-pattern does not update what I see in the GUI.

repositories:
- Bitbucket:
type: bitbucket-server
server: BitBucket
project: PROJ
slug: proj
clone-url: <redacted>
public-key: <redacted>
private-key: <redacted> 
branch: master
command-timeout-minutes: '180'
use-shallow-clones: false
cache-on-agents: true
submodules: false
ssh-key-applies-to-submodules: true
verbose-logs: true
fetch-all: false
lfs: false
viewer:
com.atlassian.bamboo.plugins.stash.atlassian-bamboo-plugin-stash:bbServerViewer: {}
change-detection:
file-filter-type: include_only
file-filter-pattern: **/delete.me

1 answer

1 accepted

5 votes
Answer accepted
Jyothi Charupalli
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2024

Hi Jay,

 

Welcome to the Atlassian Community!

To include a single type of pattern file in the change detection options under repository configuration, you can try something like the below:

change-detection:
file-filter-type: include_only
file-filter-pattern: .+\.txt

Please also refer to this Bamboo yaml specs document for more details on this.

 

Best Regards,

Jyothi

*please don't forget to Accept the answer if your query was answered**

jay_vee March 27, 2024

Thanks Jyothi

let's say for example, I have the following folder structure

ansible/roles/app1/

ansible/roles/app2/

containers/app1/

containers/app2/

How would I target just the app1 folders?

I get errors in the yaml validation when I use:

**/*app1*/**

'**/*app1*/**'

*app1*

/**/*app1*/

 

however, it works if I do:

/(ansible/roles|containers)/*app1*/

but 

any ideas how to get it to work with `**` ?

Jyothi Charupalli
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 3, 2024

Hi Jay,

The regular expression pattern should have the whole path pattern to match the files. That is why the below is working as expected, which is the correct pattern.

/(ansible/roles|containers)/*app1*/

Please refer to _planRepositoryIncludeExcludeFilesExamples for some examples.

Best Regards,

Jyothi

jay_vee April 3, 2024

Thanks Jyothi

There are no examples on that page with a `**`. Am I correct then, when I say that the `**` wildcard doesn't work?

Jyothi Charupalli
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 4, 2024

Hi Jay,

Yes, you are absolutely right! These wildcards like(**) will not work in this "IncludeExcludeFilespattern" under Bamboo Repository configuration as we need to provide the whole path pattern to match the files as mentioned in my previous comment.

Best Regards,

Jyothi

Like Steffen Opel _Utoolity_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events