What I am trying to accomplish - I want to have a wrapper for git itself, that will retry if the git command fails (timeout/network issue).
I have following dummy code of wrapper:
"C:\Program Files\Git\cmd\git.exe" %*
echo Success!
After changing $PATH and saving the file as git.cmd and removing path to git.exe it works well if I call any git command directly from jenkins:
script {
bat 'git clone %REPO%'
}
result:
(...)
Updating files: 100% (5314/5314), done.
17:58:51 E:\jenkins\workspace\sandbox>echo Success!
17:58:51 Success!
However I want it to work for multibranch pipeline, which uses jenkins git plugin

