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

Pipeline always poll the last build branch only

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • None

      We have a few single pipeline job that is setup to run when changes in different project folder happen. It will get instructed to poll when a `curl http://ourjenkins/git/notifyCommit?url=git_url` happen.

      ```
      Repo/
          ProjectA/

          ProjectB/

      ```

      We have set branches to build to be `any`, however, it always only polls the last build branch instead of the latest branch.

          [JENKINS-46416] Pipeline always poll the last build branch only

          Andrew Bayer added a comment -

          Yes. The polling looks at the checkout(s) for the last build to determine what to poll, so if you change the branch you checked out, it's always going to poll on the most recent branch.

          Andrew Bayer added a comment - Yes. The polling looks at the checkout(s) for the last build to determine what to poll, so if you change the branch you checked out, it's always going to poll on the most recent branch.

          Zac Kwan added a comment -

          Hi, does this means that it is the intended behavior for pipeline job?

          So despite having any in the branch to build, if the last job trigger by the build now button picked up `feature-branch-a`. When `feature-branch-b` got committed at a later stage and that triggered `notifyCommit` job to instruct other pipelines job to poll it will still only poll `feature-branch-a`?

          Zac Kwan added a comment - Hi, does this means that it is the intended behavior for pipeline job? So despite having any  in the branch to build , if the last job trigger by the build now  button picked up ` feature-branch-a`.  When ` feature-branch-b ` got committed at a later stage and that triggered `notifyCommit` job to instruct other pipelines job to poll it will still only poll `feature-branch-a`?

            Unassigned Unassigned
            zac_kwan Zac Kwan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: