Sfoglia il codice sorgente

feat(jenkins): upd

zengzhixiang 2 anni fa
parent
commit
b6813e117f
1 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. 6 2
      Jenkinsfile

+ 6 - 2
Jenkinsfile

@@ -36,8 +36,12 @@ pipeline {
     }
     stage('构建项目') {
       steps {
-        nodejs('v16') {
-          sh 'npm run build:prod'
+        script {
+          if ( env.BRANCH_NAME == 'master' ) {
+            nodejs('v16') {
+              sh 'npm run build:prod'
+            }
+          }
         }
       }
       // script {