@@ -36,13 +36,17 @@ pipeline {
}
stage('构建项目') {
steps {
- nodejs('v16') {
- script {
- if ( '${BRANCH_NAME}' === 'master' ) {
+ script {
+ if ( '${BRANCH_NAME}' === 'master' ) {
+ nodejs('v16') {
sh 'npm run build:prod'
- } else if ( '${BRANCH_NAME}' === 'uat' ){
+ }
+ } else if ( '${BRANCH_NAME}' === 'uat' ){
sh 'npm run build:uat'
- } else {
+ } else {
sh 'npm run build:test'