Jump to content

Filtering out changes to specific folders or files for triggers


urinal-cake
 Share

Recommended Posts

We have a trigger that kicks off a build any time we check into our source control. However, there are some files that we want whitelisted, so that they do not trigger a build. We are currently filtering any file that is in /main, using the argument:

--filter="rep:OurRepository,br:/main"

If we want to prevent filter out a specific file (or ideally, folder) from inclusion in the trigger, how can we do that?

 
Trigger documentation states that it utilizes regular expressions. Do we need to use a negative lookbehind, or lookahead? Has this been tested, and if so, what was the syntax used? Is there another way this can be accomplished without use of regex?

Link to comment
Share on other sites

  • 3 weeks later...

 I tried lookbehind and lookahead and even an exclamation mark in case it was the same as Plastic's pattern files, but unfortunately, a negative filter does not achieve the outcome that you expect here. The options for filtering are very basic meaning wildcards (*) are as advanced as it gets. My suggestion would be to do your own conditional checking from the standard input within your trigger application.

I have raised this with the Product Management team as a possible improvement to the triggers functionality. Thank you for raising it!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...