build: remove local npmrc.

This commit is contained in:
liqiang-fit2cloud 2022-10-27 14:54:43 +08:00
parent cae58b73f2
commit a6686528b5
1 changed files with 3 additions and 6 deletions

9
Jenkinsfile vendored
View File

@ -42,12 +42,11 @@ 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'), configFile(fileId: 'metersphere-npmrc', targetLocation: '.npmrc')]) { configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) {
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
export PATH=$JAVA_HOME/bin:$PATH export PATH=$JAVA_HOME/bin:$PATH
export NPM_CONFIG_USERCONFIG=`pwd`/.npmrc
java -version java -version
./mvnw install -N -Drevision=${REVISION} --settings ./settings.xml ./mvnw install -N -Drevision=${REVISION} --settings ./settings.xml
''' '''
@ -57,12 +56,11 @@ 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'), configFile(fileId: 'metersphere-npmrc', targetLocation: '.npmrc')]) { configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) {
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
export PATH=$JAVA_HOME/bin:$PATH export PATH=$JAVA_HOME/bin:$PATH
export NPM_CONFIG_USERCONFIG=`pwd`/.npmrc
java -version java -version
./mvnw install -N -Drevision=${REVISION} --settings ./settings.xml ./mvnw install -N -Drevision=${REVISION} --settings ./settings.xml
./mvnw clean install -Drevision=${REVISION} -pl framework,framework/sdk-parent,framework/sdk-parent/domain,framework/sdk-parent/sdk,framework/sdk-parent/xpack-interface --settings ./settings.xml ./mvnw clean install -Drevision=${REVISION} -pl framework,framework/sdk-parent,framework/sdk-parent/domain,framework/sdk-parent/sdk,framework/sdk-parent/xpack-interface --settings ./settings.xml
@ -83,12 +81,11 @@ pipeline {
} }
} }
steps { steps {
configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml'), configFile(fileId: 'metersphere-npmrc', targetLocation: '.npmrc')]) { configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) {
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
export PATH=$JAVA_HOME/bin:$PATH export PATH=$JAVA_HOME/bin:$PATH
export NPM_CONFIG_USERCONFIG=`pwd`/.npmrc
java -version java -version
./mvnw clean package -Drevision=${REVISION} --settings ./settings.xml ./mvnw clean package -Drevision=${REVISION} --settings ./settings.xml