Files
lots/Jenkinsfile
Daniel Sikeler 795b335cb5 new package for IDL interfaces
For java modules to jars can't provide classes in the same package. So
the WollMux interfaces (IDL files) are moved into a new package called
de.muenchen.allg.itd51.wollmux.interfaces.

Compile the classes with Java 11 and provide a module description. The
module is called wollmux.interfaces.
2020-09-29 09:00:45 +02:00

97 lines
2.8 KiB
Groovy

#!/usr/bin/env groovy
pipeline {
agent {
label 'wollmux'
}
options {
disableConcurrentBuilds()
}
tools {
jdk 'Java11'
}
environment {
UNO_PATH = '/opt/libreoffice6.4/program/'
}
stages {
stage('Build') {
steps {
withMaven(
maven: 'mvn',
mavenLocalRepo: '.repo',
mavenSettingsConfig: 'org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig1441715654272',
publisherStrategy: 'EXPLICIT') {
sh "mvn -DskipTests -DdryRun clean package"
}
}
}
stage('Junit') {
steps {
withMaven(
maven: 'mvn',
mavenLocalRepo: '.repo',
mavenSettingsConfig: 'org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig1441715654272',
publisherStrategy: 'EXPLICIT') {
sh "mvn -Dmaven.javadoc.skip=true -DdryRun test verify"
}
}
}
stage('Quality Gate') {
steps {
script {
if (GIT_BRANCH == 'master' || GIT_BRANCH ==~ 'WollMux_[0-9]*.[0-9]*') {
withMaven(
maven: 'mvn',
mavenLocalRepo: '.repo',
mavenSettingsConfig: 'org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig1441715654272',
publisherStrategy: 'EXPLICIT') {
withSonarQubeEnv('SonarQube') {
sh "mvn $SONAR_MAVEN_GOAL \
-Dsonar.projectKey=de.muenchen:wollmux \
-Dsonar.branch.name=${GIT_BRANCH} \
-Dsonar.java.source=11 \
-Dsonar.java.target=11 \
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml \
-Dsonar.junit.reportPaths=target/surefire-reports,target/failsafe-reports"
}
}
} else {
archiveArtifacts artifacts: 'oxt/target/WollMux.oxt'
withMaven(
maven: 'mvn',
mavenLocalRepo: '.repo',
mavenSettingsConfig: 'org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig1441715654272',
publisherStrategy: 'EXPLICIT') {
withSonarQubeEnv('SonarQube') {
sh "mvn $SONAR_MAVEN_GOAL \
-Dsonar.projectKey=de.muenchen:wollmux \
-Dsonar.branch.name=${GIT_BRANCH} \
-Dsonar.branch.target=${env.CHANGE_TARGET} \
-Dsonar.java.source=11 \
-Dsonar.java.target=11 \
-Dsonar.coverage.jacoco.xmlReportPaths=**/target/site/jacoco/jacoco.xml \
-Dsonar.junit.reportPaths=target/surefire-reports,target/failsafe-reports"
}
}
timeout(time: 1, unit: 'HOURS') {
waitForQualityGate abortPipeline: true
}
}
}
}
}
}
post {
cleanup {
cleanWs()
}
}
}