Fix pipeline checkout ref resolution on agents

This commit is contained in:
2026-03-15 02:03:22 +01:00
parent 5235eb2aa4
commit c745758cef

5
Jenkinsfile vendored
View File

@@ -19,11 +19,12 @@ pipeline {
export GIT_SSH_COMMAND="ssh -i $GIT_KEYFILE -o StrictHostKeyChecking=accept-new" export GIT_SSH_COMMAND="ssh -i $GIT_KEYFILE -o StrictHostKeyChecking=accept-new"
if [ -d .git ]; then if [ -d .git ]; then
git remote set-url origin ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git git remote set-url origin ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git
git fetch --tags --force --progress origin git fetch --tags --force --progress origin +refs/heads/master:refs/remotes/origin/master
else else
git clone ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git . git clone ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git .
git fetch --tags --force --progress origin +refs/heads/master:refs/remotes/origin/master
fi fi
git checkout -f origin/master git checkout -f refs/remotes/origin/master
''' '''
} }
} }