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

Jenkins job builds all branches even there is only change on 1 branch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • _unsorted
    • 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..

      https://..com/github-webhook/

      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?

       

            Unassigned Unassigned
            libai567 Li
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: