Explorar el Código

feat(jenkins): upd

zengzhixiang hace 2 años
padre
commit
c467ac054b
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      Jenkinsfile

+ 5 - 1
Jenkinsfile

@@ -26,7 +26,11 @@ pipeline {
     stage('构建项目') {
       steps {
         script {
-          if ( env.BRANCH_NAME == 'master' ) {
+          if ( env.TAG_NAME ) {
+            nodejs('v16') {
+              sh 'npm run build:prod'
+            }
+          } else if ( env.BRANCH_NAME == 'master' ) {
             nodejs('v16') {
               sh 'npm run build:prod'
             }