From 82a179a46a25955107753dda2a91c03c07a1a0b4 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Wed, 24 Nov 2021 00:18:50 -0300 Subject: [PATCH] Jenkins: Specify branch name with LocalBranch --- .ci/Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index daeef4128..2daa94a9f 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -79,8 +79,9 @@ def anyFailure = false def gitClone() { /* Read git tag from environment or set the default one. */ + def branch = 'master' if (env.GIT_COMMIT == null) - env.GIT_COMMIT = 'master' + env.GIT_COMMIT = branch println "[-] Using git tag [${env.GIT_COMMIT}]" /* Clean workspace. */ @@ -91,6 +92,7 @@ def gitClone() { /* Perform clone/checkout. */ def scmVars = checkout scm: [$class: 'GitSCM', branches: [[name: env.GIT_COMMIT]], + extensions: [[$class: 'LocalBranch', localBranch: branch]], userRemoteConfigs: [[url: 'https://github.com/86Box/86Box.git']]] env.GIT_COMMIT = scmVars.GIT_COMMIT