build: 尝试使用本地npmrc配置

This commit is contained in:
liqiang-fit2cloud 2022-10-17 10:54:02 +08:00
parent b7b467954e
commit 63302677ce
1 changed files with 3 additions and 3 deletions

6
Jenkinsfile vendored
View File

@ -40,7 +40,7 @@ pipeline {
stage('POM') { stage('POM') {
when { environment name: 'BUILD_PARENT', value: 'true' } when { environment name: 'BUILD_PARENT', value: 'true' }
steps { steps {
configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) { configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml'), configFile(fileId: 'metersphere-npmrc', targetLocation: '.npmrc')]) {
sh '''#!/bin/bash -xe sh '''#!/bin/bash -xe
export JAVA_HOME=/opt/jdk-11 export JAVA_HOME=/opt/jdk-11
export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH
@ -54,7 +54,7 @@ pipeline {
stage('SDK') { stage('SDK') {
when { environment name: 'BUILD_SDK', value: 'true' } when { environment name: 'BUILD_SDK', value: 'true' }
steps { steps {
configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) { configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml'), configFile(fileId: 'metersphere-npmrc', targetLocation: '.npmrc')]) {
sh '''#!/bin/bash -xe sh '''#!/bin/bash -xe
export JAVA_HOME=/opt/jdk-11 export JAVA_HOME=/opt/jdk-11
export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH
@ -79,7 +79,7 @@ pipeline {
} }
} }
steps { steps {
configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) { configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml'), configFile(fileId: 'metersphere-npmrc', targetLocation: '.npmrc')]) {
sh '''#!/bin/bash -xe sh '''#!/bin/bash -xe
export JAVA_HOME=/opt/jdk-11 export JAVA_HOME=/opt/jdk-11
export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH