-
Bug
-
Resolution: Unresolved
-
Critical
-
None
-
jenkins 2.289.1, git plugin 4.7.2, git 2.31.1.windows.1
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 )
- 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:
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
Fix https://github.com/jenkinsci/git-client-plugin/pull/750