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

Git-Publisher should allow to push tags from a shallow clone

    XMLWordPrintable

    Details

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

      Description

      Git-Publisher should allow to push tags / branches from a shallow clone. New Git versions (1.9.0+) allow pushing tags from shallow clone (see here and here for example), but latest version of Git-Publisher still forbids this (see source code). It prints the following message, but it does not fail the build:

      GitPublisher disabled while using shallow clone.
      

      I could propose a pull request to resolve this ticket in the coming days. My solution would be to try to push the tag, and show a reasonably nice error message if it fails due to old Git version. This behavior is slightly different than the current one, because currently job succeeds. What do you think?

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          I've deployed git client plugin 1.19.1.SNAPSHOT to the Jenkins artifactory. If you refresh the git plugin pull request (change a commit message, add a commit, etc.), the Cloudbees provided continuous integration job will evaluate the again.

          Show
          markewaite Mark Waite added a comment - I've deployed git client plugin 1.19.1.SNAPSHOT to the Jenkins artifactory. If you refresh the git plugin pull request (change a commit message, add a commit, etc.), the Cloudbees provided continuous integration job will evaluate the again.
          Hide
          loomchild Jarek Lipski added a comment -

          Great, thanks for info.

          I have updated the commit and triggered the new build - it's passing now.

          Show
          loomchild Jarek Lipski added a comment - Great, thanks for info. I have updated the commit and triggered the new build - it's passing now.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jarek Lipski
          Path:
          src/main/java/hudson/plugins/git/GitPublisher.java
          http://jenkins-ci.org/commit/git-plugin/e31193b42a40c8c2a9415904985b2ceb3bd79231
          Log:
          Allow publishing from shallow clone

          Previously this operation was forbidden in versions of Git CLI < 1.9.0
          (see http://stackoverflow.com/q/6900103 for more details).

          Now this operation will succeed using newer client version, but it will
          fail when using an old version due to
          https://github.com/jenkinsci/git-client-plugin/pull/192

          Fixes JENKINS-31108.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jarek Lipski Path: src/main/java/hudson/plugins/git/GitPublisher.java http://jenkins-ci.org/commit/git-plugin/e31193b42a40c8c2a9415904985b2ceb3bd79231 Log: Allow publishing from shallow clone Previously this operation was forbidden in versions of Git CLI < 1.9.0 (see http://stackoverflow.com/q/6900103 for more details). Now this operation will succeed using newer client version, but it will fail when using an old version due to https://github.com/jenkinsci/git-client-plugin/pull/192 Fixes JENKINS-31108 .
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Mark Waite
          Path:
          pom.xml
          src/main/java/hudson/plugins/git/GitPublisher.java
          http://jenkins-ci.org/commit/git-plugin/25538270a0f1e5874f925096b14d2f3334bb14ac
          Log:
          Merge pull request #364 from loomchild/master

          JENKINS-31108 Allow publishing from shallow clone

          Compare: https://github.com/jenkinsci/git-plugin/compare/0cb5b0a811af...25538270a0f1

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: pom.xml src/main/java/hudson/plugins/git/GitPublisher.java http://jenkins-ci.org/commit/git-plugin/25538270a0f1e5874f925096b14d2f3334bb14ac Log: Merge pull request #364 from loomchild/master JENKINS-31108 Allow publishing from shallow clone Compare: https://github.com/jenkinsci/git-plugin/compare/0cb5b0a811af...25538270a0f1
          Hide
          markewaite Mark Waite added a comment -

          Included in git plugin 2.4.3, released 19 Mar 2016.

          Show
          markewaite Mark Waite added a comment - Included in git plugin 2.4.3, released 19 Mar 2016.

            People

            • Assignee:
              markewaite Mark Waite
              Reporter:
              loomchild Jarek Lipski
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: