Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-65932

Git plugin with polling ignore certain paths triggers on paths not included into include regions

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • git-plugin
    • None
    • jenkins 2.289.1, git plugin 4.7.2, git 2.31.1.windows.1

      Steps to reproduce:

      1. Create a empty git repository, for example https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem/-/tree/main
      2. Clone one
      3. Create the not_triggered_branch with the notriggereddir directory and one file inside, commit and push
      4. Return to the main branch and add the triggereddir directory and one file inside, commit and push
      5. Create free job in Jenkins, git checkout from repository, add polling ignore certain paths with include region: ^triggereddir/.* and check SCM periodically (here is my configuration https://pastebin.com/53E1k6Vk )
      6. Wait until the just created job started
      7. Merge the not_triggered_branch branch with the untriggereddir directory into the main branch, push 
      8. You can observe that the our job has been triggered and started, but the notriggeredir directory is not include region. 

      Here is a log for the invalid triggered job:
       

      Started on 18.06.2021 21:18:59
      Polling SCM changes on master
      Using strategy: Default
      [poll] Last Built Revision: Revision 28adb19c518b2d32ab79980e8c234465e59f9d04 (refs/remotes/origin/main)
      The recommended git tool is: NONE
      No credentials specified
       > git rev-parse --resolve-git-dir D:\Jenkins\jobs\jenkins-git-plugin-problem-with-polling\workspace\.git # timeout=10
      Fetching changes from the remote Git repositories
       > git config remote.origin.url https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git # timeout=10
      Fetching upstream changes from https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git
       > git --version # timeout=10
       > git --version # 'git version 2.31.1.windows.1'
       > git fetch --tags --force --progress -- https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git +refs/heads/*:refs/remotes/origin/* # timeout=10
      Polling for changes in
       > git rev-parse "refs/remotes/origin/main^{commit}" # timeout=10
       > git log --full-history --no-abbrev --format=raw -M -m --raw 28adb19c518b2d32ab79980e8c234465e59f9d04..b97c302743fe36e6e596a207397b93af2f0ab425 # timeout=10
      Ignored commit b97c302743fe36e6e596a207397b93af2f0ab425: No paths matched included region whitelist
      Done. Took 0,95 sec
      Changes found 
      

       
       

          [JENKINS-65932] Git plugin with polling ignore certain paths triggers on paths not included into include regions

          Anatoly Shirokov created issue -
          Anatoly Shirokov made changes -
          Description Original: Steps to reproduces:
           # Create a empty git repository, for example [https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem/-/tree/main]
           # Clone one
           # Create the not_triggered_branch with the notriggereddir directory and one file inside, commit and push
           # Return to the main branch and add the triggereddir directory and one file inside, commit and push
           # Create free job in Jenkins, git checkout from repository, add polling ignore certain paths with include region: ^triggereddir/.* and check SCM periodically (here is my configuration[ https://pastebin.com/53E1k6Vk )|https://pastebin.com/53E1k6Vk]
           # Wait until the just created job started
           # Merge the not_triggered_branch branch with the untriggereddir directory into the main branch, push 
           # You can observe that the our job has been triggered and started, but the notriggeredir directory is not include region.

           

           
          New: Steps to reproduces:
           # Create a empty git repository, for example [https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem/-/tree/main]
           # Clone one
           # Create the not_triggered_branch with the notriggereddir directory and one file inside, commit and push
           # Return to the main branch and add the triggereddir directory and one file inside, commit and push
           # Create free job in Jenkins, git checkout from repository, add polling ignore certain paths with include region: ^triggereddir/.* and check SCM periodically (here is my configuration[ https://pastebin.com/53E1k6Vk )|https://pastebin.com/53E1k6Vk]
           # Wait until the just created job started
           # Merge the not_triggered_branch branch with the untriggereddir directory into the main branch, push 
           # You can observe that the our job has been triggered and started, but the notriggeredir directory is not include region. 

          Here is log for the invalid triggered job:

           
          {noformat}
          Started on 18.06.2021 21:18:59 Polling SCM changes on master Using strategy: Default [poll] Last Built Revision: Revision 28adb19c518b2d32ab79980e8c234465e59f9d04 (refs/remotes/origin/main) The recommended git tool is: NONE No credentials specified > git rev-parse --resolve-git-dir D:\Jenkins\jobs\jenkins-git-plugin-problem-with-polling\workspace\.git # timeout=10 Fetching changes from the remote Git repositories > git config remote.origin.url
          https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git
          # timeout=10 Fetching upstream changes from
          https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git
          > git --version # timeout=10 > git --version # 'git version 2.31.1.windows.1' > git fetch --tags --force --progress --
          https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git
          +refs/heads/*:refs/remotes/origin/* # timeout=10 Polling for changes in > git rev-parse "refs/remotes/origin/main^{commit}" # timeout=10 > git log --full-history --no-abbrev --format=raw -M -m --raw 28adb19c518b2d32ab79980e8c234465e59f9d04..b97c302743fe36e6e596a207397b93af2f0ab425 # timeout=10 Ignored commit b97c302743fe36e6e596a207397b93af2f0ab425: No paths matched included region whitelist Done. Took 0,95 sec Changes found
           
          {noformat}
           
           
          Anatoly Shirokov made changes -
          Description Original: Steps to reproduces:
           # Create a empty git repository, for example [https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem/-/tree/main]
           # Clone one
           # Create the not_triggered_branch with the notriggereddir directory and one file inside, commit and push
           # Return to the main branch and add the triggereddir directory and one file inside, commit and push
           # Create free job in Jenkins, git checkout from repository, add polling ignore certain paths with include region: ^triggereddir/.* and check SCM periodically (here is my configuration[ https://pastebin.com/53E1k6Vk )|https://pastebin.com/53E1k6Vk]
           # Wait until the just created job started
           # Merge the not_triggered_branch branch with the untriggereddir directory into the main branch, push 
           # You can observe that the our job has been triggered and started, but the notriggeredir directory is not include region. 

          Here is log for the invalid triggered job:

           
          {noformat}
          Started on 18.06.2021 21:18:59 Polling SCM changes on master Using strategy: Default [poll] Last Built Revision: Revision 28adb19c518b2d32ab79980e8c234465e59f9d04 (refs/remotes/origin/main) The recommended git tool is: NONE No credentials specified > git rev-parse --resolve-git-dir D:\Jenkins\jobs\jenkins-git-plugin-problem-with-polling\workspace\.git # timeout=10 Fetching changes from the remote Git repositories > git config remote.origin.url
          https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git
          # timeout=10 Fetching upstream changes from
          https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git
          > git --version # timeout=10 > git --version # 'git version 2.31.1.windows.1' > git fetch --tags --force --progress --
          https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git
          +refs/heads/*:refs/remotes/origin/* # timeout=10 Polling for changes in > git rev-parse "refs/remotes/origin/main^{commit}" # timeout=10 > git log --full-history --no-abbrev --format=raw -M -m --raw 28adb19c518b2d32ab79980e8c234465e59f9d04..b97c302743fe36e6e596a207397b93af2f0ab425 # timeout=10 Ignored commit b97c302743fe36e6e596a207397b93af2f0ab425: No paths matched included region whitelist Done. Took 0,95 sec Changes found
           
          {noformat}
           
           
          New: Steps to reproduces:
           # Create a empty git repository, for example [https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem/-/tree/main]
           # Clone one
           # Create the not_triggered_branch with the notriggereddir directory and one file inside, commit and push
           # Return to the main branch and add the triggereddir directory and one file inside, commit and push
           # Create free job in Jenkins, git checkout from repository, add polling ignore certain paths with include region: ^triggereddir/.* and check SCM periodically (here is my configuration[ https://pastebin.com/53E1k6Vk )|https://pastebin.com/53E1k6Vk]
           # Wait until the just created job started
           # Merge the not_triggered_branch branch with the untriggereddir directory into the main branch, push 
           # You can observe that the our job has been triggered and started, but the notriggeredir directory is not include region. 

          Here is log for the invalid triggered job:

           
          {noformat}
          Started on 18.06.2021 21:18:59
          Polling SCM changes on master
          Using strategy: Default
          [poll] Last Built Revision: Revision 28adb19c518b2d32ab79980e8c234465e59f9d04 (refs/remotes/origin/main)
          The recommended git tool is: NONE
          No credentials specified
           > git rev-parse --resolve-git-dir D:\Jenkins\jobs\jenkins-git-plugin-problem-with-polling\workspace\.git # timeout=10
          Fetching changes from the remote Git repositories
           > git config remote.origin.url https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git # timeout=10
          Fetching upstream changes from https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git
           > git --version # timeout=10
           > git --version # 'git version 2.31.1.windows.1'
           > git fetch --tags --force --progress -- https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git +refs/heads/*:refs/remotes/origin/* # timeout=10
          Polling for changes in
           > git rev-parse "refs/remotes/origin/main^{commit}" # timeout=10
           > git log --full-history --no-abbrev --format=raw -M -m --raw 28adb19c518b2d32ab79980e8c234465e59f9d04..b97c302743fe36e6e596a207397b93af2f0ab425 # timeout=10
          Ignored commit b97c302743fe36e6e596a207397b93af2f0ab425: No paths matched included region whitelist
          Done. Took 0,95 sec
          Changes found 
          {noformat}
           
           
          Anatoly Shirokov made changes -
          Summary Original: Git plugin with polling ignore certain paths triggers unwanted paths New: Git plugin with polling ignore certain paths triggers paths not included into include regions
          Anatoly Shirokov made changes -
          Description Original: Steps to reproduces:
           # Create a empty git repository, for example [https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem/-/tree/main]
           # Clone one
           # Create the not_triggered_branch with the notriggereddir directory and one file inside, commit and push
           # Return to the main branch and add the triggereddir directory and one file inside, commit and push
           # Create free job in Jenkins, git checkout from repository, add polling ignore certain paths with include region: ^triggereddir/.* and check SCM periodically (here is my configuration[ https://pastebin.com/53E1k6Vk )|https://pastebin.com/53E1k6Vk]
           # Wait until the just created job started
           # Merge the not_triggered_branch branch with the untriggereddir directory into the main branch, push 
           # You can observe that the our job has been triggered and started, but the notriggeredir directory is not include region. 

          Here is log for the invalid triggered job:

           
          {noformat}
          Started on 18.06.2021 21:18:59
          Polling SCM changes on master
          Using strategy: Default
          [poll] Last Built Revision: Revision 28adb19c518b2d32ab79980e8c234465e59f9d04 (refs/remotes/origin/main)
          The recommended git tool is: NONE
          No credentials specified
           > git rev-parse --resolve-git-dir D:\Jenkins\jobs\jenkins-git-plugin-problem-with-polling\workspace\.git # timeout=10
          Fetching changes from the remote Git repositories
           > git config remote.origin.url https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git # timeout=10
          Fetching upstream changes from https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git
           > git --version # timeout=10
           > git --version # 'git version 2.31.1.windows.1'
           > git fetch --tags --force --progress -- https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git +refs/heads/*:refs/remotes/origin/* # timeout=10
          Polling for changes in
           > git rev-parse "refs/remotes/origin/main^{commit}" # timeout=10
           > git log --full-history --no-abbrev --format=raw -M -m --raw 28adb19c518b2d32ab79980e8c234465e59f9d04..b97c302743fe36e6e596a207397b93af2f0ab425 # timeout=10
          Ignored commit b97c302743fe36e6e596a207397b93af2f0ab425: No paths matched included region whitelist
          Done. Took 0,95 sec
          Changes found 
          {noformat}
           
           
          New: Steps to reproduces:
           # Create a empty git repository, for example [https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem/-/tree/main]
           # Clone one
           # Create the not_triggered_branch with the notriggereddir directory and one file inside, commit and push
           # Return to the main branch and add the triggereddir directory and one file inside, commit and push
           # Create free job in Jenkins, git checkout from repository, add polling ignore certain paths with include region: ^triggereddir/.* and check SCM periodically (here is my configuration[ https://pastebin.com/53E1k6Vk )|https://pastebin.com/53E1k6Vk]
           # Wait until the just created job started
           # Merge the not_triggered_branch branch with the untriggereddir directory into the main branch, push 
           # You can observe that the our job has been triggered and started, but the notriggeredir directory is not include region. 

          Here is a log for the invalid triggered job:
           
          {noformat}
          Started on 18.06.2021 21:18:59
          Polling SCM changes on master
          Using strategy: Default
          [poll] Last Built Revision: Revision 28adb19c518b2d32ab79980e8c234465e59f9d04 (refs/remotes/origin/main)
          The recommended git tool is: NONE
          No credentials specified
           > git rev-parse --resolve-git-dir D:\Jenkins\jobs\jenkins-git-plugin-problem-with-polling\workspace\.git # timeout=10
          Fetching changes from the remote Git repositories
           > git config remote.origin.url https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git # timeout=10
          Fetching upstream changes from https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git
           > git --version # timeout=10
           > git --version # 'git version 2.31.1.windows.1'
           > git fetch --tags --force --progress -- https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git +refs/heads/*:refs/remotes/origin/* # timeout=10
          Polling for changes in
           > git rev-parse "refs/remotes/origin/main^{commit}" # timeout=10
           > git log --full-history --no-abbrev --format=raw -M -m --raw 28adb19c518b2d32ab79980e8c234465e59f9d04..b97c302743fe36e6e596a207397b93af2f0ab425 # timeout=10
          Ignored commit b97c302743fe36e6e596a207397b93af2f0ab425: No paths matched included region whitelist
          Done. Took 0,95 sec
          Changes found 
          {noformat}
           
           
          Anatoly Shirokov made changes -
          Description Original: Steps to reproduces:
           # Create a empty git repository, for example [https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem/-/tree/main]
           # Clone one
           # Create the not_triggered_branch with the notriggereddir directory and one file inside, commit and push
           # Return to the main branch and add the triggereddir directory and one file inside, commit and push
           # Create free job in Jenkins, git checkout from repository, add polling ignore certain paths with include region: ^triggereddir/.* and check SCM periodically (here is my configuration[ https://pastebin.com/53E1k6Vk )|https://pastebin.com/53E1k6Vk]
           # Wait until the just created job started
           # Merge the not_triggered_branch branch with the untriggereddir directory into the main branch, push 
           # You can observe that the our job has been triggered and started, but the notriggeredir directory is not include region. 

          Here is a log for the invalid triggered job:
           
          {noformat}
          Started on 18.06.2021 21:18:59
          Polling SCM changes on master
          Using strategy: Default
          [poll] Last Built Revision: Revision 28adb19c518b2d32ab79980e8c234465e59f9d04 (refs/remotes/origin/main)
          The recommended git tool is: NONE
          No credentials specified
           > git rev-parse --resolve-git-dir D:\Jenkins\jobs\jenkins-git-plugin-problem-with-polling\workspace\.git # timeout=10
          Fetching changes from the remote Git repositories
           > git config remote.origin.url https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git # timeout=10
          Fetching upstream changes from https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git
           > git --version # timeout=10
           > git --version # 'git version 2.31.1.windows.1'
           > git fetch --tags --force --progress -- https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git +refs/heads/*:refs/remotes/origin/* # timeout=10
          Polling for changes in
           > git rev-parse "refs/remotes/origin/main^{commit}" # timeout=10
           > git log --full-history --no-abbrev --format=raw -M -m --raw 28adb19c518b2d32ab79980e8c234465e59f9d04..b97c302743fe36e6e596a207397b93af2f0ab425 # timeout=10
          Ignored commit b97c302743fe36e6e596a207397b93af2f0ab425: No paths matched included region whitelist
          Done. Took 0,95 sec
          Changes found 
          {noformat}
           
           
          New: Steps to reproduce:
           # Create a empty git repository, for example [https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem/-/tree/main]
           # Clone one
           # Create the not_triggered_branch with the notriggereddir directory and one file inside, commit and push
           # Return to the main branch and add the triggereddir directory and one file inside, commit and push
           # Create free job in Jenkins, git checkout from repository, add polling ignore certain paths with include region: ^triggereddir/.* and check SCM periodically (here is my configuration[ https://pastebin.com/53E1k6Vk )|https://pastebin.com/53E1k6Vk]
           # Wait until the just created job started
           # Merge the not_triggered_branch branch with the untriggereddir directory into the main branch, push 
           # You can observe that the our job has been triggered and started, but the notriggeredir directory is not include region. 

          Here is a log for the invalid triggered job:
           
          {noformat}
          Started on 18.06.2021 21:18:59
          Polling SCM changes on master
          Using strategy: Default
          [poll] Last Built Revision: Revision 28adb19c518b2d32ab79980e8c234465e59f9d04 (refs/remotes/origin/main)
          The recommended git tool is: NONE
          No credentials specified
           > git rev-parse --resolve-git-dir D:\Jenkins\jobs\jenkins-git-plugin-problem-with-polling\workspace\.git # timeout=10
          Fetching changes from the remote Git repositories
           > git config remote.origin.url https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git # timeout=10
          Fetching upstream changes from https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git
           > git --version # timeout=10
           > git --version # 'git version 2.31.1.windows.1'
           > git fetch --tags --force --progress -- https://gitlab.com/anatoly.shirokov/jenkins-git-plugin-problem.git +refs/heads/*:refs/remotes/origin/* # timeout=10
          Polling for changes in
           > git rev-parse "refs/remotes/origin/main^{commit}" # timeout=10
           > git log --full-history --no-abbrev --format=raw -M -m --raw 28adb19c518b2d32ab79980e8c234465e59f9d04..b97c302743fe36e6e596a207397b93af2f0ab425 # timeout=10
          Ignored commit b97c302743fe36e6e596a207397b93af2f0ab425: No paths matched included region whitelist
          Done. Took 0,95 sec
          Changes found 
          {noformat}
           
           
          Anatoly Shirokov made changes -
          Summary Original: Git plugin with polling ignore certain paths triggers paths not included into include regions New: Git plugin with polling ignore certain paths triggers on paths not included into include regions

          Anatoly Shirokov added a comment - Fix https://github.com/jenkinsci/git-client-plugin/pull/750

            markewaite Mark Waite
            anatolys Anatoly Shirokov
            Votes:
            6 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: