Skip to content

Commit

Permalink
IM-259 Update .withParams to use JDK17 & mvnw
Browse files Browse the repository at this point in the history
  • Loading branch information
iperdomo committed Jan 24, 2024
1 parent 8a98f41 commit 3bda9d9
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions Jenkinsfile.withParams
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def kmodelers = [
]

pipeline {
agent { label "mvn-java-agent"}
agent { label "klab-agent-jdk17"}
options { skipDefaultCheckout(true) }
parameters {
string(name: 'BRANCH',
Expand Down Expand Up @@ -51,11 +51,11 @@ pipeline {
returnStdout: true).trim()
MAVEN_OPTS="--illegal-access=permit"
REGISTRY = "registry.integratedmodelling.org"
STAT_CONTAINER = "stat-server-16"
ENGINE_CONTAINER = "engine-server-16"
HUB_CONTAINER = "hub-server-16"
NODE_CONTAINER = "node-server-16"
BASE_CONTAINER = "klab-base-16:bc344fa9a66e93edaa3a2b528a65e7efa2e55a6f"
STAT_CONTAINER = "stat-server-17"
ENGINE_CONTAINER = "engine-server-17"
HUB_CONTAINER = "hub-server-17"
NODE_CONTAINER = "node-server-17"
BASE_CONTAINER = "klab-base-17:04da07762c87f77f2a3c04c880815327f94643c3"
MAIN = "master"
DEVELOP = "develop"
PRODUCTS_GEN = "yes"
Expand Down Expand Up @@ -113,7 +113,7 @@ pipeline {

env.SNAPSHOT = sh(
returnStdout: true,
script: 'mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate ' +
script: './mvnw org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate ' +
'-Dexpression=project.version -q -DforceStdout ' +
'--batch-mode -U -e -Dsurefire.useFile=false'
).trim()
Expand Down Expand Up @@ -159,7 +159,15 @@ pipeline {
stage('Maven install with jib') {
steps {
withCredentials([usernamePassword(credentialsId: "${params.REGISTRY_CREDENTIALS}", passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME')]) {
sh 'export JAVA_HOME=/opt/java16/openjdk && mvn clean install -U -DskipTests jib:build -Djib.httpTimeout=60000'
sh './mvnw clean install -U -DskipTests jib:build -Djib.httpTimeout=60000'
}
}
}

stage('Maven deploy') {
steps {
configFileProvider([configFile(fileId: '1f5f24a2-9839-4194-b2ad-0613279f9fba', variable: 'MAVEN_SETTINGS_XML')]) {
sh './mvnw --settings $MAVEN_SETTINGS_XML deploy -pl :api -DskipTests'
}
}
}
Expand Down

0 comments on commit 3bda9d9

Please sign in to comment.