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

Multiple refspecs should be matched using OR, not AND

    XMLWordPrintable

Details

    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

            hannes_ucsc Hannes Schmidt added a comment - https://github.com/jenkinsci/git-plugin/pull/343

            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

            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

            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

            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
            markewaite Mark Waite added a comment -

            Fixed in first git plugin release after 2.4.0

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

            Included in git plugin 2.4.1 released 26 May 2015

            markewaite Mark Waite added a comment - Included in git plugin 2.4.1 released 26 May 2015
            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.

            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.

            Confirmed fixed in 2.4.1

            hannes_ucsc Hannes Schmidt added a comment - Confirmed fixed in 2.4.1

            People

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

              Dates

                Created:
                Updated:
                Resolved: