-
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:
.
[JENKINS-63776] `checkout scm` returns inconsistent values for branch name property
Component/s | New: workflow-scm-step-plugin [ 21717 ] | |
Component/s | Original: pipeline-library [ 23622 ] | |
Key | Original: INFRA-2407 | New: JENKINS-63776 |
Workflow | Original: classic default workflow [ 241260 ] | New: JNJira + In-Review [ 246269 ] |
Project | Original: Infrastructure [ 10301 ] | New: Jenkins [ 10172 ] |