Build with JDK9 and JDK10

This commit is contained in:
Martin Stockhammer 2018-05-18 19:32:06 +02:00
parent 39739b0056
commit fd2d49761a
3 changed files with 77 additions and 17 deletions

68
Jenkinsfile vendored
View File

@ -29,6 +29,8 @@
*/ */
LABEL = 'ubuntu' LABEL = 'ubuntu'
buildJdk = 'JDK 1.8 (latest)' buildJdk = 'JDK 1.8 (latest)'
buildJdk9 = 'JDK 1.9 (latest)'
buildJdk10 = 'JDK 10 (latest)'
buildMvn = 'Maven 3.5.2' buildMvn = 'Maven 3.5.2'
deploySettings = 'DefaultMavenSettingsProvider.1331204114925' deploySettings = 'DefaultMavenSettingsProvider.1331204114925'
@ -39,21 +41,6 @@ pipeline {
stages { stages {
stage('Checkout') {
steps {
script {
echo "Info: Job-Name=${JOB_NAME}, Branch=${BRANCH_NAME}, Workspace=${PWD}"
}
checkout scm
}
post {
failure {
notifyBuild("Checkout failure")
}
}
}
stage('BuildAndDeploy') { stage('BuildAndDeploy') {
steps { steps {
timeout(120) { timeout(120) {
@ -92,14 +79,61 @@ pipeline {
} }
} }
} }
stage('JDKs') {
parallel {
stage('JDK9') {
steps {
ws("${env.JOB_NAME}-JDK9") {
timeout(120) {
withMaven(maven: buildMvn, jdk: buildJdk9,
mavenSettingsConfig: deploySettings,
mavenLocalRepo: ".repository",
options: [concordionPublisher(disabled: true), dependenciesFingerprintPublisher(disabled: true),
findbugsPublisher(disabled: true), artifactsPublisher(disabled: true),
invokerPublisher(disabled: true), jgivenPublisher(disabled: true),
junitPublisher(disabled: true, ignoreAttachments: false),
openTasksPublisher(disabled: true), pipelineGraphPublisher(disabled: true)]
)
{
sh "mvn clean install -B -U -e -fae -T2"
}
}
}
}
}
stage('JDK10') {
steps {
ws("${env.JOB_NAME}-JDK10") {
timeout(120) {
withMaven(maven: buildMvn, jdk: buildJdk10,
mavenSettingsConfig: deploySettings,
mavenLocalRepo: ".repository",
options: [concordionPublisher(disabled: true), dependenciesFingerprintPublisher(disabled: true),
findbugsPublisher(disabled: true), artifactsPublisher(disabled: true),
invokerPublisher(disabled: true), jgivenPublisher(disabled: true),
junitPublisher(disabled: true, ignoreAttachments: false),
openTasksPublisher(disabled: true), pipelineGraphPublisher(disabled: true)]
)
{
sh "mvn clean install -B -U -e -fae -T2"
}
}
}
}
}
}
}
} }
post { post {
unstable { unstable {
notifyBuild("Unstable Build") notifyBuild("Unstable Build")
} }
always { failure {
cleanWs deleteDirs: true, notFailBuild: true, patterns: [[pattern: '.repository', type: 'EXCLUDE']] notifyBuild("Error in redback build")
} }
success { success {
script { script {

13
pom.xml
View File

@ -631,6 +631,19 @@
<artifactId>assertj-core</artifactId> <artifactId>assertj-core</artifactId>
<version>1.7.1</version> <version>1.7.1</version>
</dependency> </dependency>
<!-- Dependencies for JDK >=9 update -->
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>

View File

@ -196,6 +196,19 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- Needed for JDK >= 9 -->
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>