Allow git-plugin to fail step rather than throw exception

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      When working with submodules it is possible that their history were rewritten git fetch will fail with a message like "error: Server does not allow request for unadvertised object". (With regular git usage, you can fetch again and git will succeed. )

      What happens with git-plugin is it makes this into an exception causing my declarative pipeline to fail. What I would like to do is to put checkout step into a retry(2) block and try to recover from this kind of issues.

      This is where I see exceptions are stemming from.

      https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/GitSCM.java#L998

      What I would like to suggest is to have an option in git-plugin to turn exceptions into failures, so I can re-execute my checkout step once more.

      Does that make sense?

            Assignee:
            Unassigned
            Reporter:
            Ali Utku
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: