Update 'Jenkinsfile'

fix GIT_BRANCH var
This commit is contained in:
Roberto Cirillo 2022-09-21 14:22:04 +02:00
parent 70a6b9bd9f
commit c1c1e2fb01
1 changed files with 2 additions and 1 deletions

3
Jenkinsfile vendored
View File

@ -13,7 +13,8 @@ pipeline {
environment {
JAVA_HOME='/usr/lib/jvm/java-8-openjdk-amd64'
GIT_URL= "${params.GIT_URL}"
GIT_BRANCH= "${params.GIT_BRANCH.split("/")[1]}"
GIT_BRANCH="${GIT_BRANCH.split('/').size() > 1 ? GIT_BRANCH.split('/')[1..-1].join('/') : GIT_BRANCH}"
// GIT_BRANCH= "${params.GIT_BRANCH.split("/")[1]}"
// GIT_BRANCH= "${params.GIT_BRANCH}"
}
parameters {