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 '''