-
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
-
[JENKINS-71456] Jenkins job builds all branches even there is only change on 1 branch
Description |
Original:
My jenkins version is : [Jenkins 2.401.1|https://www.jenkins.io/]
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 ** {color:#4c9aff}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){color} {color:#172b4d}I changed the jenkins config for Branch Specifier to be testBranch2, then repeat same steps,{color} {color:#172b4d}*GitHubPollLog* shows ** {color} {color:#4c9aff}Started on Jun 14, 2023, 1:21:01 PM Started by event from 10.10.*.* ⇒ {color} {color:#4c9aff}*[https://*.*.com/github-webhook/|https://ci-sw.trellisware.com/github-webhook/]*{color} {color:#4c9aff} 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{color} {color:#172b4d}Why when branch is defined as any(**, or blank) Jenkins is Polling SCM changes on jenkins child ( which is the child node running last job)?{color} |
New:
My jenkins version is : [Jenkins 2.401.1|https://www.jenkins.io/]
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 ** {color:#4c9aff}Started on Jun 14, 2023, 12:06:18 PM Started by event from 10.10.{*}.{*}⇒ [https://*.*.com/github-webhook/|https://%2A.%2A.com/github-webhook/] on Wed Jun 14 12:06:18 PDT 2023 {color:#de350b}Polling SCM changes on jenkins-child-***{color} <---------this is a jenkins child node Using strategy: Default [poll] Last Built Revision: Revision 11b17b64ff29b5f393bd265673c89e24a4c36739 (origin/testBranch1){color} {color:#172b4d}I changed the jenkins config for Branch Specifier to be testBranch2, then repeat same steps,{color} {color:#172b4d}*GitHubPollLog* shows ** {color} {color:#4c9aff}Started on Jun 14, 2023, 1:21:01 PM Started by event from 10.10.{*}.{*} ⇒ {color} {color:#4c9aff}*[https://{*}.{*}.com/github-webhook/|https://ci-sw.trellisware.com/github-webhook/]*{color} {color:#4c9aff} on Wed Jun 14 13:21:01 PDT 2023 Using strategy: {color:#de350b}Default [poll] Last Built Revision: Revision{color} 19d6b1e94302eead2020a09f358360887de1b0b8 (origin/testBranch2) The recommended git tool is: NONE{color} {color:#172b4d}Why when branch is defined as any(**, or blank) Jenkins is Polling SCM changes on jenkins child, it may not have the latest info?{color} |
Link | New: This issue blocks JENKINS-19022 [ JENKINS-19022 ] |
Resolution | New: Duplicate [ 3 ] | |
Status | Original: Open [ 1 ] | New: Closed [ 6 ] |
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