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

Git with multiple repos fails if remotes/ used in branch specifier

      1. Create a *new* job with two git repository URLs (note: two remotes, not MultiSCM). Ensure you name give the second one a different remote name. For example:

      origin -> git://github.com/blt04/jenkins-test1.git
      upstream -> git://github.com/blt04/jenkins-test2.git
      

      2. Set the branch specifier to "remotes/origin/master"
      3. Run the job.

      Expected results:
      Job runs with origin/master

      Actual results:
      Job does not run. Console log looks similar to:

      Seen branch in repository origin/master
      Seen branch in repository upstream/master
      Seen branch in repository upstream/test2-only
      Seen 3 remote branches
      ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
      

      NOTE: This only occurs if you have never built the job before. If you've ever successfully built, this works fine.

          [JENKINS-26268] Git with multiple repos fails if remotes/ used in branch specifier

          Brandon Turner added a comment - Potential fix: https://github.com/jenkinsci/git-plugin/pull/285

          Mark Waite added a comment -

          Potential fix also proposed in https://github.com/jenkinsci/git-plugin/pull/395

          Mark Waite added a comment - Potential fix also proposed in https://github.com/jenkinsci/git-plugin/pull/395

          Code changed in jenkins
          User: Mark Waite
          Path:
          src/test/java/hudson/plugins/git/GitSCMTest.java
          http://jenkins-ci.org/commit/git-plugin/b0a4057298808407801d86550b73ec5614dc5683
          Log:
          JENKINS-26268 test checkout of remotes/origin/master with two repos defined

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/test/java/hudson/plugins/git/GitSCMTest.java http://jenkins-ci.org/commit/git-plugin/b0a4057298808407801d86550b73ec5614dc5683 Log: JENKINS-26268 test checkout of remotes/origin/master with two repos defined

          Mark Waite added a comment -

          Fixed in git plugin 2.5.0 released 19 Jun 2016

          Mark Waite added a comment - Fixed in git plugin 2.5.0 released 19 Jun 2016

            ndeloof Nicolas De Loof
            blt04 Brandon Turner
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: