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

Provide a retry option when GitPublisher fails to push a tag

    Details

    • Similar Issues:

      Description

      We periodically get Jenkins test failures, because GitPublisher is not able to push the passing build's tag to github.
      From time to time when github rejects the connection and causes the push to fail. A subsequent rebuild tends to go through.
      It might be nice to have an option to allow for retrying a push after some amount of delay.

      Here is an example of a failed push.
      <pre>
      Pushing tag ci_157 to repo origin
      ERROR: Failed to push tag ci_157 to origin
      hudson.plugins.git.GitException: Command "git push origin ci_157" returned status code 128:
      stdout:
      stderr: ssh_exchange_identification: Connection closed by remote host
      fatal: The remote end hung up unexpectedly

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:772)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:738)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:790)
      at hudson.plugins.git.GitPublisher$3.invoke(GitPublisher.java:303)
      at hudson.plugins.git.GitPublisher$3.invoke(GitPublisher.java:265)
      at hudson.FilePath.act(FilePath.java:865)
      at hudson.FilePath.act(FilePath.java:838)
      at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:265)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:814)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:786)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:733)
      at hudson.model.Run.execute(Run.java:1593)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:237)
      Build step 'Git Publisher' changed build result to FAILURE
      Build step 'Git Publisher' marked build as failure
      </pre>

      A manual run a few minutes after this failure passes (on the same jenkins server)
      <pre>
      Pushing tag ci_158 to repo origin
      Email was triggered for: Success
      </pre>

        Attachments

          Activity

          zev Zev Blut created issue -
          ndeloof Nicolas De Loof made changes -
          Field Original Value New Value
          Issue Type Bug [ 1 ] Improvement [ 4 ]
          integer Kanstantsin Shautsou made changes -
          Labels GitSCMExtension git-publisher
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 150323 ] JNJira + In-Review [ 177611 ]
          ndeloof Nicolas De Loof made changes -
          Assignee Nicolas De Loof [ ndeloof ]

            People

            • Assignee:
              Unassigned
              Reporter:
              zev Zev Blut
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: