Browse Source

更新 'deploy/Jenkinsfile'

lishiwei 11 months ago
parent
commit
de826a378f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      deploy/Jenkinsfile

+ 2 - 1
deploy/Jenkinsfile

@@ -13,8 +13,9 @@ pipeline {
     GIT_LOG = sh (script: "git log --oneline -n 1", returnStdout: true).trim()
     BUILD_USER_NAME = sh(script: "git log -1 --pretty=format:'%an'", returnStdout: true).trim()
     TITLE = "${JOB_BASE_NAME}-${ENV_APP}"
+    GIT_BRANCH_NAME = env.GIT_BRANCH.substring(env.GIT_BRANCH.lastIndexOf('/') + 1)
     TIMESTAMP = sh(returnStdout: true, script: "TZ=Asia/Shanghai date  +'%F_%H-%M-%S'").trim()
-    TAG = "${ENV_APP}-${TIMESTAMP}"
+    TAG = "${ENV_APP}-${GIT_BRANCH_NAME}-${TIMESTAMP}"
   }
   stages {
     stage('git-log') {