From 0558cea18b6e22221f6c6ec567e7fee7168bbd1d Mon Sep 17 00:00:00 2001 From: Mandel Olaiya Date: Sun, 15 Mar 2026 01:34:04 +0100 Subject: [PATCH] Bypass default SCM checkout on agents and use explicit git checkout --- Jenkinsfile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8119278..d7ebb9a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 '''