build: 使用jdk11运行

This commit is contained in:
CaptainB 2022-03-17 19:19:34 +08:00
parent 2536b974c9
commit 31399d0a91
1 changed files with 1 additions and 1 deletions

2
Jenkinsfile vendored
View File

@ -13,7 +13,7 @@ pipeline {
stage('Build/Test') { stage('Build/Test') {
steps { steps {
configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) { configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) {
sh 'export JAVA_HOME=/usr/local/jdk-11;export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH;export PATH=$JAVA_HOME/bin:$PATH' sh 'export JAVA_HOME=/opt/jdk-11;export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH;export PATH=$JAVA_HOME/bin:$PATH'
sh "./mvnw clean package --settings ./settings.xml" sh "./mvnw clean package --settings ./settings.xml"
sh "mkdir -p backend/target/dependency && (cd backend/target/dependency; jar -xf ../*.jar)" sh "mkdir -p backend/target/dependency && (cd backend/target/dependency; jar -xf ../*.jar)"
} }