ci: jdk base line 21

This commit is contained in:
CaptainB 2023-09-22 15:11:10 +08:00 committed by 刘瑞斌
parent a55c01c9c8
commit a4c0e57821
3 changed files with 7 additions and 7 deletions

View File

@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up JDK 17 - name: Set up JDK 21
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: 'zulu'
java-version: 17 java-version: 21
- name: Build with Maven - name: Build with Maven
run: mvn -B package --file pom.xml run: mvn -B package --file pom.xml
- name: Upload coverage reports to Codecov - name: Upload coverage reports to Codecov

6
Jenkinsfile vendored
View File

@ -12,7 +12,7 @@ pipeline {
environment { environment {
IMAGE_PREFIX = 'registry.cn-qingdao.aliyuncs.com/metersphere' IMAGE_PREFIX = 'registry.cn-qingdao.aliyuncs.com/metersphere'
IMAGE_NAME = 'metersphere' IMAGE_NAME = 'metersphere'
JAVA_HOME = '/opt/jdk-17' JAVA_HOME = '/opt/jdk-21'
} }
stages { stages {
stage('Preparation') { stage('Preparation') {
@ -42,7 +42,7 @@ pipeline {
steps { steps {
configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) { configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) {
sh '''#!/bin/bash -xe sh '''#!/bin/bash -xe
export JAVA_HOME=/opt/jdk-17 export JAVA_HOME=/opt/jdk-21
export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:/opt/apache-maven-3.8.3/bin:$PATH export PATH=$JAVA_HOME/bin:/opt/apache-maven-3.8.3/bin:$PATH
java -version java -version
@ -57,7 +57,7 @@ pipeline {
steps { steps {
configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) { configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) {
sh '''#!/bin/bash -xe sh '''#!/bin/bash -xe
export JAVA_HOME=/opt/jdk-17 export JAVA_HOME=/opt/jdk-21
export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH export CLASSPATH=$JAVA_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:/opt/apache-maven-3.8.3/bin:$PATH export PATH=$JAVA_HOME/bin:/opt/apache-maven-3.8.3/bin:$PATH
java -version java -version

View File

@ -19,7 +19,7 @@
<properties> <properties>
<revision>3.x</revision> <revision>3.x</revision>
<java.version>17</java.version> <java.version>21</java.version>
<dubbo.version>2.7.22</dubbo.version> <dubbo.version>2.7.22</dubbo.version>
<platform-plugin-sdk.version>1.5.0</platform-plugin-sdk.version> <platform-plugin-sdk.version>1.5.0</platform-plugin-sdk.version>
<shiro.version>1.12.0</shiro.version> <shiro.version>1.12.0</shiro.version>