Excluded Regions in Jenkins with Git

I have a git repository where I created two different jobs in Jenkins (one for production code and one for tools). If both tasks always work!

I added Excluded regions for each job to run only in each correct folder.

Our git root folder contains the following:

/src/ /tools/ /test/ /doc/ /third party/ 

In my original Jenkins task, I have the following Excluded regions

 /tools/.* /Test Projects/.* /doc/.* 

In my work with tools I have excluded folie regions

 /src/.* /Test Projects/.* /doc/.* 

The problem is that if I click the change in the doc folder, both jobs start. I also do not have the regions included in the list.

+4
source share
1 answer

This setting should work.

However, if you use Gerrit Triggers in Jenkins, the excluded / included areas in the GitSCM plugin will not work. The Gerrit Trigger plugin has the ability to add paths to files that will work as a scope, i.e. The assembly will be activated only when the file path changes.

In setting up your job's Gerrit trigger, add the file path as shown below to include the tool directory.

Path Tools / **

+5
source

All Articles