-
Bug
-
Resolution: Unresolved
-
Minor
-
None
Using same Jenkinsfile for jenkins piepline and jenkins multi-branch project returns different values for branch name property for result of `checkout scm` command.
I am trying to extract branch name without remote name. e.g. dev and not origin/dev
script {
scmVars = checkout scm
echo "scmVars: ${scmVars}"
}
For jenkins multibranch pipeline project I am getting exepected value:
scmVars: [*GIT_BRANCH:dev*, GIT_COMMIT:32f5748fb219621babebcf680040578aa5cd8a20, GIT_PREVIOUS_COMMIT:3c83fcf5c404b37ebde858de5d2194ea9cc0c06d, GIT_PREVIOUS_SUCCESSFUL_COMMIT:3c83fcf5c404b37ebde858de5d2194ea9cc0c06d, GIT_URL:http://myproject]
For jenkins pipeline project I am getting:
.