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

Multiple refspecs should be matched using OR, not AND

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      I'm using the GH plugin and the GH PR builder plugin together since I want to build PRs before they are merged but I also want to build the master branch of my projectafter a PR was merged into it. Consequently, I set the Refspec field of the job to

      +refs/pull/*:refs/remotes/origin/pr/* +refs/heads/*:refs/remotes/origin/*
      

      The first refspec is for the PR builder plugin, the second one for the GH plugin. Unfortunately, the git plugin somehow requires that a remote head with changes matches both refspecs, not just one of them. Since it is impossible that a head matches both refspecs, it rejects all pushes to the master branch and doesn't trigger a build. This happens regardless of whether I use polling or a web hook. Will file PR shortly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ndeloof Nicolas De Loof
                Reporter:
                hannes_ucsc Hannes Schmidt
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: