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

Multiple refspecs should be matched using OR, not AND

    XMLWordPrintable

    Details

    • 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

            Show
            hannes_ucsc Hannes Schmidt added a comment - https://github.com/jenkinsci/git-plugin/pull/343
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Hannes Schmidt
            Path:
            src/test/java/hudson/plugins/git/SCMTriggerTest.java
            http://jenkins-ci.org/commit/git-plugin/e67c39c12378775cf8b13ea6261a26a0640f93b1
            Log:
            Added test for JENKINS-29796

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Hannes Schmidt Path: src/test/java/hudson/plugins/git/SCMTriggerTest.java http://jenkins-ci.org/commit/git-plugin/e67c39c12378775cf8b13ea6261a26a0640f93b1 Log: Added test for JENKINS-29796
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Mark Waite
            Path:
            src/main/java/hudson/plugins/git/GitSCM.java
            src/test/java/hudson/plugins/git/SCMTriggerTest.java
            http://jenkins-ci.org/commit/git-plugin/9abd397b0b7176ca6e18b900723e563ab84fbb03
            Log:
            Merge pull request #343 from hannes-ucsc/JENKINS-29796

            JENKINS-29796 Multiple refspecs should be matched using OR, not AND

            Compare: https://github.com/jenkinsci/git-plugin/compare/af01132e56f7...9abd397b0b71

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/main/java/hudson/plugins/git/GitSCM.java src/test/java/hudson/plugins/git/SCMTriggerTest.java http://jenkins-ci.org/commit/git-plugin/9abd397b0b7176ca6e18b900723e563ab84fbb03 Log: Merge pull request #343 from hannes-ucsc/ JENKINS-29796 JENKINS-29796 Multiple refspecs should be matched using OR, not AND Compare: https://github.com/jenkinsci/git-plugin/compare/af01132e56f7...9abd397b0b71
            Hide
            markewaite Mark Waite added a comment -

            Fixed in first git plugin release after 2.4.0

            Show
            markewaite Mark Waite added a comment - Fixed in first git plugin release after 2.4.0
            Hide
            markewaite Mark Waite added a comment -

            Included in git plugin 2.4.1 released 26 May 2015

            Show
            markewaite Mark Waite added a comment - Included in git plugin 2.4.1 released 26 May 2015
            Hide
            markewaite Mark Waite added a comment -

            I was unable to duplicate the original bug report as part of my testing of git plugin 2.4.1 and git client plugin 1.19.1. I'll rely on Hannes or someone else who could duplicate the original problem to close this issue.

            Show
            markewaite Mark Waite added a comment - I was unable to duplicate the original bug report as part of my testing of git plugin 2.4.1 and git client plugin 1.19.1. I'll rely on Hannes or someone else who could duplicate the original problem to close this issue.
            Hide
            hannes_ucsc Hannes Schmidt added a comment -

            Confirmed fixed in 2.4.1

            Show
            hannes_ucsc Hannes Schmidt added a comment - Confirmed fixed in 2.4.1

              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: