I just noticed a potential bug.
I changed these:
Included Regions: Project1\/.+
Excluded Regions:
On Wednesday, 14 June 2017 11:44:43 UTC+1, Mark Allison wrote:
>
> I have a github repo called multibranch-test with two sub-directories
> Project1, Project2.
>
> PS C:\Repos\multibranch-test> tree .
> Folder PATH listing for volume Windows
> Volume serial number is 2085-6D3D
> C:\REPOS\MULTIBRANCH-TEST
> ├───Project1
> └───Project2
>
>
> Each sub-directory has a Jenkinsfile and the code for that project.
>
> I Jenkins I have two multibranch pipeline jobs - one for Project1 and one
> for Project2. In the configuration for Project1 I don't want a push
> notification or polling to build Project1 if a commit was pushed in
> sub-directory for Project2.
>
> So in Project1 I have configured Additional Behaviours:
> *Advanced clone behaviours*
> Shallow clone is checked
> *Sparse checkout path *is set to Project1
> *Polling ignores commits in certain paths*
> Included Regions: Project1/*
> Excluded Regions: *
>
> *Build Configuration*
> Script Path: Project1/Jenkinsfile
>
> What is happening is if I push a commit to master in sub-directory
> Project2, Project1 and Project2 jobs get built. I only want Project2 to
> build. Can someone point out what I'm doing wrong?
>
> Jenkinsfiles for both Projects are similar and look like:
>
> #!groovy
> node {
> stage ('checkout') {
> checkout scm
> }
> stage ('build') {
> dir ('Project1') {
> bat 'powershell -Command gci'
> bat 'powershell -Command gci env:'
> bat 'powershell -File .\\Project1.ps1'
> }
> }
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/2d93af03-096e-49ff-a66b-29672a53324e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.