Skip to content

Commit

Permalink
Use different stages for klass-api vs klass-forvaltning
Browse files Browse the repository at this point in the history
  • Loading branch information
Skaar, Bjørn-Andre committed Jan 24, 2024
1 parent a52c660 commit f149f42
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,33 @@ pipeline {
}

tools {
if (${params.ARTIFACT} == 'klass-api') {
jdk 'OpenJDK Java 17'
} else {
jdk 'Oracle Java 8'
}
maven 'Maven 3.5.2'
git 'Default'
}

stages {

stage("Build & deploy SNAPSHOT to Nexus") {
when {
expression { params.ARTIFACT == 'klass-api' }
}
tools {
jdk 'OpenJDK Java 17'
}
steps {
sh "mvn -B clean deploy -Pdocumentation -pl :klass-api -am"
}
}

stage("Build & deploy SNAPSHOT to Nexus") {
when {
expression { params.ARTIFACT == 'klass-forvaltning' }
}
tools {
jdk 'Oracle Java 8'
}
steps {
sh "mvn -B clean deploy -Pdocumentation -pl :${params.ARTIFACT} -am"
sh "mvn -B clean deploy -Pdocumentation -Djava.version=1.8 -pl :klass-forvaltning -am"
}
}

Expand Down

0 comments on commit f149f42

Please sign in to comment.