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

Git Plugin fails to resolve tags containing a slash since 2.0.1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      Since updating from 2.0.1 to 2.0.3, a job which uses tags containing a slash as "branch" does not work anymore (rel/x.y.z-... in my case)

      I my case, a sepate job creates a release tag (refs/tags/rel/my-tag).

      The job that stopped to work tries to check out this given tag (using a parameter: so the branch field contains the value: rel/$version)

      Using git plugin 2.0.1, this works. Using git plugin 2.0.3 the checkout attempt results in "Couldn't find any revision to build. Verify the repository and branch configuration for this job."

      Downgrading to 2.0.1 solves the problem.

      The problem has already been discussed in JENKINS-14026, but the applied fix only works for slash-less tags

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephan Pauxberger
            Path:
            src/main/java/hudson/plugins/git/util/DefaultBuildChooser.java
            http://jenkins-ci.org/commit/git-plugin/c7dae80b85c19acec2e52783cdc8335681d816e5
            Log:
            JENKINS-21952 Resolve tags with slashes

            If no revisions are found, try to use the branch as explicit reference.
            This could be a tag rel/my-tags or any other explicit reference like a
            gerrit changeset (refs/changes/xx/yy/z).

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephan Pauxberger Path: src/main/java/hudson/plugins/git/util/DefaultBuildChooser.java http://jenkins-ci.org/commit/git-plugin/c7dae80b85c19acec2e52783cdc8335681d816e5 Log: JENKINS-21952 Resolve tags with slashes If no revisions are found, try to use the branch as explicit reference. This could be a tag rel/my-tags or any other explicit reference like a gerrit changeset (refs/changes/xx/yy/z).
            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/util/DefaultBuildChooser.java
            http://jenkins-ci.org/commit/git-plugin/7b8955796e87c8d1a0974cb07a1cba82c5e15e11
            Log:
            Merge pull request #205 from pauxus/21952-tags-with-slashes

            JENKINS-21952 Resolve tags with slashes

            Compare: https://github.com/jenkinsci/git-plugin/compare/e6b41fb200f9...7b8955796e87

            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/util/DefaultBuildChooser.java http://jenkins-ci.org/commit/git-plugin/7b8955796e87c8d1a0974cb07a1cba82c5e15e11 Log: Merge pull request #205 from pauxus/21952-tags-with-slashes JENKINS-21952 Resolve tags with slashes Compare: https://github.com/jenkinsci/git-plugin/compare/e6b41fb200f9...7b8955796e87
            Hide
            markewaite Mark Waite added a comment -

            Fix should be visible in the next git-plugin after 2.0.4

            Show
            markewaite Mark Waite added a comment - Fix should be visible in the next git-plugin after 2.0.4
            Hide
            markewaite Mark Waite added a comment -

            Fixed in git-plugin 2.1.0

            Show
            markewaite Mark Waite added a comment - Fixed in git-plugin 2.1.0
            Hide
            dejan2609 Dejan Stojadinović added a comment -

            Mark Waite Sorry for the late reply; just to confirm that upgrade to Jenkins Git plugin 2.1.0 and Jenkins Git client plugin 1.7.0 solved my issues (mentioned above).
            Thanx !

            Show
            dejan2609 Dejan Stojadinović added a comment - Mark Waite Sorry for the late reply; just to confirm that upgrade to Jenkins Git plugin 2.1.0 and Jenkins Git client plugin 1.7.0 solved my issues (mentioned above). Thanx !

              People

              • Assignee:
                ndeloof Nicolas De Loof
                Reporter:
                paux Stephan Pauxberger
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: