Skip to content

Commit

Permalink
Merge pull request #196 from integratedmodelling/IM-455-jib-build
Browse files Browse the repository at this point in the history
IM-455 Enable Docker build for `master` and `develop` branch
  • Loading branch information
iperdomo authored Sep 26, 2024
2 parents 6f5d086 + e49c7f2 commit 753033e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pipeline {
VERSION_DATE = sh(
script: "date '+%Y-%m-%dT%H:%M:%S'",
returnStdout: true).trim()
MAVEN_OPTS="--illegal-access=permit"
MAVEN_OPTS="-Xmx1g"
REGISTRY = "registry.integratedmodelling.org"
STAT_CONTAINER = "stat-server-17"
ENGINE_CONTAINER = "engine-server-17"
Expand Down Expand Up @@ -87,8 +87,13 @@ pipeline {

stage('Maven install with jib') {
steps {
script {
jibBuild = 'jib:build -Djib.httpTimeout=180000'
dockerBuild = sh(script: "git log -1 --pretty=%B | grep -qi '\\[docker build\\]'", returnStatus: true)
env.JIB = (env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'develop' || dockerBuild == 0) ? jibBuild : ''
}
withCredentials([usernamePassword(credentialsId: "${env.REGISTRY_CREDENTIALS}", passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME')]) {
sh './mvnw -U clean install -DskipTests jib:build -Djib.httpTimeout=180000'
sh "./mvnw -U clean install -DskipTests ${env.JIB}"
sh './mvnw -pl :klab.ogc -pl :klab.node test -Dtest="*STAC*,Authentication*"'
}
}
Expand Down

0 comments on commit 753033e

Please sign in to comment.