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

Polling Ignores Commits In Certain Paths feature fails to work when changes are merged from a branch onto the branch that is being polled

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • None
    • Jenkins - 1.580.3, Git Plugin - 2.4.1 (was seen in 2.4.0) too,

      We use Polling Ignores Commits in Certain Paths option to poll for changes in a specific directory of the git repo. It works smooth until we merge changes from another branch onto the polled branch.

      Even though the merged changes don't come under the Included Regions, builds get triggered.

      Job Config looking for changes only under "harsha" directory.

      Build triggered by changes polled under a different directory

      Ideally even when the merge happens, the plugin should trigger changes based on the included regions.

        1. GitFail.JPG
          GitFail.JPG
          34 kB
        2. JobGit.JPG
          JobGit.JPG
          90 kB

          [JENKINS-32386] Polling Ignores Commits In Certain Paths feature fails to work when changes are merged from a branch onto the branch that is being polled

          Fabien LD added a comment -

          Browsing on this page because I have the exactly same issue: we have a repo with multiple libraries, each in a subdirectory:

          • library1
          • library2
          • library3
            We have a job per library polling changes in the matching subdirectory. I all works fine with normal commits, but fails when a merge is done from another branch.

          I.e. if I commit to master (the branch we are polling) a change to a file inside the subdir "library1", then only the associated job is triggered as expected.
          If I create a branch "awesome-feature-for-library1" and inside that branch edit a file inside the subdir "library1" and create a PR (we are using github) that is merged, then the jobs for each lib is called (while only the job associated to "library1" is expected to run.

          We are using:

          • jenkins 2.20
          • git client plugin 2.0.0
          • git plugin 3.0.0

          Fabien LD added a comment - Browsing on this page because I have the exactly same issue: we have a repo with multiple libraries, each in a subdirectory: library1 library2 library3 We have a job per library polling changes in the matching subdirectory. I all works fine with normal commits, but fails when a merge is done from another branch. I.e. if I commit to master (the branch we are polling) a change to a file inside the subdir "library1", then only the associated job is triggered as expected. If I create a branch "awesome-feature-for-library1" and inside that branch edit a file inside the subdir "library1" and create a PR (we are using github) that is merged, then the jobs for each lib is called (while only the job associated to "library1" is expected to run. We are using: jenkins 2.20 git client plugin 2.0.0 git plugin 3.0.0

          mihai ono added a comment -

          mihai ono added a comment - This appears to be same issue with   https://issues.jenkins-ci.org/browse/JENKINS-20389   and similar with https://issues.jenkins-ci.org/browse/JENKINS-28032

            Unassigned Unassigned
            sriharshadv Sriharsha DV
            Votes:
            8 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: