We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 235af78 commit 374dec5Copy full SHA for 374dec5
Jenkinsfile
@@ -20,12 +20,12 @@ try {
20
21
stage('Checkout repository') {
22
23
- checkout scm
+ scmVars = checkout scm
24
25
pom = readMavenPom file: 'pom.xml'
26
currentVersion = pom.version
27
revision = sh(returnStdout: true, script: "git rev-parse --short HEAD").trim()
28
- branch = sh(returnStdout: true, script: "git rev-parse --abbrev-ref HEAD").trim()
+ branch = scmVars.GIT_BRANCH.replaceAll("origin/", "")
29
30
}
31
0 commit comments