-
Bug
-
Resolution: Duplicate
-
Major
-
None
My jenkins version is : Jenkins 2.401.1
I have a github repo : repoA, it has many branches, webhook is setup and has been working for a few years ( spray method)
One jenkins, there job: testJob, it is freestyle project, with GitHub hook trigger for GITScm polling selected, Source Code Management pointed to this repoA, Branch Specifier is **, it has been working for years.
there was recent jenkins upgrade and plugin upgrade,
Issue:
I did a change on testBranch1, commit on Github, testJob got poked ( I can see this from log), but the job starts to build all branches, as if the jenkins thinks all branches have been changed. There is only change on 1 branch.
Some debug info
GitHubPollLog shows **
Started on Jun 14, 2023, 12:06:18 PM
Started by event from 10.10..⇒ https://..com/github-webhook/ on Wed Jun 14 12:06:18 PDT 2023
Polling SCM changes on jenkins-child-*** <---------this is a jenkins child node
Using strategy: Default
[poll] Last Built Revision: Revision 11b17b64ff29b5f393bd265673c89e24a4c36739 (origin/testBranch1)
I changed the jenkins config for Branch Specifier to be testBranch2, then repeat same steps,
GitHubPollLog shows **
Started on Jun 14, 2023, 1:21:01 PM Started by event from 10.10.. ⇒
on Wed Jun 14 13:21:01 PDT 2023 Using strategy: Default [poll] Last Built Revision: Revision 19d6b1e94302eead2020a09f358360887de1b0b8 (origin/testBranch2) The recommended git tool is: NONE
Why when branch is defined as any(**, or blank) Jenkins is Polling SCM changes on jenkins child, it may not have the latest info?
- blocks
-
JENKINS-19022 GIT Plugin (any version) heavily bloats memory use and size of build.xml with "BuildData" fields
-
- Open
-
I did more digging, the GitHubPollLog shows :
> git log --full-history --no-abbrev --format=raw -M -m 7dc947b4411462c81b2b311624833fc024e62cfc..a4089230452868ecfb1fc9cd4a817f61f9bafc1b # timeout=10
Totally wrong infos, Then I checked the job build.xml and log, all wrong info like
<string>GIT_COMMIT</string> in build.xml
also from log, I can see this:
JENKINS-19022: warning: possible memory leak due to Git plugin usage; see: https://plugins.jenkins.io/git/#remove-git-plugin-buildsbybranch-builddata-script