build: 使用jdk11运行 (#11595)
* build: 使用jdk11运行 Co-authored-by: CaptainB <bin@fit2cloud.com>
This commit is contained in:
parent
89376d6843
commit
2536b974c9
|
@ -40,10 +40,10 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-maven-
|
${{ runner.os }}-maven-
|
||||||
|
|
||||||
- name: Set up JDK 1.8
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 1.8
|
java-version: 11
|
||||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
||||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM metersphere/fabric8-java-alpine-openjdk8-jre
|
FROM metersphere/fabric8-java-alpine-openjdk11-jre
|
||||||
|
|
||||||
LABEL maintainer="FIT2CLOUD <support@fit2cloud.com>"
|
LABEL maintainer="FIT2CLOUD <support@fit2cloud.com>"
|
||||||
|
|
||||||
|
|
|
@ -13,9 +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 "cd frontend"
|
sh 'export JAVA_HOME=/usr/local/jdk-11;export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH;export PATH=$JAVA_HOME/bin:$PATH'
|
||||||
// sh "yarn install"
|
|
||||||
// sh "cd .."
|
|
||||||
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)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<shiro.version>1.8.0</shiro.version>
|
<shiro.version>1.8.0</shiro.version>
|
||||||
<java.version>1.8</java.version>
|
<java.version>11</java.version>
|
||||||
<flyway.version>7.15.0</flyway.version>
|
<flyway.version>7.15.0</flyway.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
@ -405,8 +405,8 @@
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>11</source>
|
||||||
<target>1.8</target>
|
<target>11</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue