I've previously had SVN as our source control and when using the polling ignore if certain paths, I've been able to set them in the Jenkins config using regex paths like "/project/buildscripts/.*"
Now that we're using git, I have one repo full of infrastructure projects, which looks like this:
[root]
/project.1
/project.2
/project.3
allprojects.sln
I want to build only the csproj within project.1 directory when a push is made into that directory by ignoring polling on /project.2 and /project.3
because there's a period in the pathing I'm trying to ignore, I'm having issues solving the proper syntax
For the section of Git labeled "Polling ignores commits in certain paths" I've tried:
Project.2/.* (which won't ignore ANY directory pushed to...) /Project.2/.* (Which ignores pushes to ALL directories) /Project.2/.* (Which ignores pushes to ALL directorys)...
I need help resolving the syntax accepted for the Included Regions of "Polling ignores commits in certain paths". does anyone know the required syntax to ignore commits in git?
I figured it out, but I still have yet to find where this is exactly documented. While SVN has simply one text fill to exclude commit paths, Git has two.
The "Included Regions" section of the Polling module is NOT "including regions you want to ignore", but for including regions you wish to poll from.
the proper place to put directories to hide from polling is the "Excluded Regions"
Also, the syntax is not like the SVN syntax. If My project were to sparse my checkout to only pull "Project.1" then to ignore polling of my other directories in git, I must write them as such in the "Excluded Region":
Project.2/.*
Project.3/.*
I hope this helps anyone else confused by the text like I was.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With