Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make push to remote more robust due to server and network issues #132

Open
bicschneider opened this issue Aug 15, 2018 · 0 comments
Open
Assignees

Comments

@bicschneider
Copy link
Contributor

bicschneider commented Aug 15, 2018

-- Try again... maybe up to one minute.. ( timeout like Git Plugin )
.. but detect if the push fails due to not fast-forward and fail..

At least:
We should try again in this scenario:

00:04:25.805 hudson.plugins.git.GitException: Command "git push <server> HEAD:refs/heads/develop" returned status code 1:
00:04:25.805 stdout: 
00:04:25.805 stderr: remote: error: cannot lock ref 'refs/heads/develop': ref refs/heads/develop is at a3e7fe28f348d4e0c42cdae7062052d7bcca9e4b but expected f23e9d2d903ab76bb3c68a2b139e1ac5e95c14c6        

We should stop trying in this scenario:

hudson.plugins.git.GitException: Command "git push <server/remote> refs/heads/masterPipeScriptedSCM:refs/heads/masterPipeScriptedSCM" returned status code 1:
stdout: 
stderr: To <server/remote>
 ! [rejected]        masterPipeScriptedSCM -> masterPipeScriptedSCM (non-fast-forward)
error: failed to push some refs to '[email protected]:bicschneider/test-git-phlow-plugin.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants