Want to create a more advanced repository trigger filter, looking for input

Hi all -

Here is our situation. We are using Bitbucket Server and have a monorepo with all of our projects in it. There are about 50 projects. We want to trigger plans based on which files/directories are changed. We have been using the Repository Change Detection Include regex and that basically works, except it is extremely limited as it is just one regex and it is only Include or Exclude.

We want more control than just the one regex. For example, we would like to have:

  • Include changes in (regex): ^/customer
  • but Exclude changes that only modify these (regex): ^/customer/meta/.*

Looking at the developer docs it looks like a Build Trigger Condition module would be a good place to put this logic. Does that make sense?

It looks like you can have a Freemarker template that goes along with this. I’m assuming that with that template we can have a field with these two regex fields and that the module can access these regex strings using the BuildConfigurationAwarePlugin methods. And will these strings get saved in the Bamboo database somewhere. Is that right? Will we be able to populate these regex strings using Java Specs?

Thanks for your input!

1 Like