fix no branch name in scope
This commit is contained in:
parent
e1b4dcfb51
commit
a19826ea49
8
install/ci/Jenkinsfile
vendored
8
install/ci/Jenkinsfile
vendored
@ -1,11 +1,13 @@
|
|||||||
stage('install:ci') {
|
stage('install:ci') {
|
||||||
def tag = sh(returnStdout: true, script: "git tag --contains").trim()
|
def tag = sh(returnStdout: true, script: "git tag --contains").trim()
|
||||||
|
def branchName = sh(returnStdout: true, script: "git rev-parse --abbrev-ref HEAD").trim()
|
||||||
|
def lastLog = sh(returnStdout: true, script: "git log -1").trim()
|
||||||
if (tag) {
|
if (tag) {
|
||||||
currentBuild.displayName = "#${BUILD_NUMBER}, tag${tag}"
|
currentBuild.displayName = "#${BUILD_NUMBER}, tag ${tag}"
|
||||||
} else {
|
} else {
|
||||||
currentBuild.displayName = "#${BUILD_NUMBER}, branch ${BRANCH}"
|
currentBuild.displayName = "#${BUILD_NUMBER}, branch ${branchName}"
|
||||||
}
|
}
|
||||||
currentBuild.description = "#${BUILD_NUMBER}, branch ${BRANCH}, tag${tag}"
|
currentBuild.description = "#${BUILD_NUMBER}, branch ${branchName}, tag ${tag}\n${lastLog}"
|
||||||
echo 'starting installing'
|
echo 'starting installing'
|
||||||
sh 'npm ci'
|
sh 'npm ci'
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user