build: 尝试自定义npmrc

This commit is contained in:
liqiang-fit2cloud 2022-10-14 14:05:59 +08:00
parent 5dfdfe3d49
commit b7c02e6e47

6
Jenkinsfile vendored
View File

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