Bypass default SCM checkout on agents and use explicit git checkout

This commit is contained in:
2026-03-15 01:34:04 +01:00
parent c9b850646c
commit 0558cea18b

18
Jenkinsfile vendored
View File

@@ -2,13 +2,29 @@
pipeline {
agent { label 'external-agent-1 || external-agent-2' }
options { disableConcurrentBuilds() }
options {
disableConcurrentBuilds()
skipDefaultCheckout(true)
}
environment {
PYENVPIPELINE_VIRTUALENV = '1'
GIT_SSH_COMMAND = 'ssh -o StrictHostKeyChecking=accept-new'
}
stages {
stage('Checkout') {
steps {
sh '''
if [ -d .git ]; then
git remote set-url origin ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git
git fetch --tags --force --progress origin
else
git clone ssh://git@git.mandelblog.com:2222/salt/mandelstudio.git .
fi
git checkout -f origin/master
'''
}
}
stage('Build') {
steps {
sh '''