From 4d09738cf56187c45552e19564dde9761701aae5 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 14 May 2018 18:55:04 +0100 Subject: [PATCH 1/4] jenkins: log errors --- Jenkinsfile.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile.groovy b/Jenkinsfile.groovy index 6b4d689..fc77851 100644 --- a/Jenkinsfile.groovy +++ b/Jenkinsfile.groovy @@ -1,4 +1,4 @@ -final String mvn = "mvn --batch-mode --update-snapshots" +final String mvn = "mvn --batch-mode --update-snapshots --errors" pipeline { agent any From c822d52b3e11d22fe9d7d89c02f25a40ba0acaee Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 14 May 2018 18:55:26 +0100 Subject: [PATCH 2/4] jenkins: add Java 10 stage --- Jenkinsfile.groovy | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Jenkinsfile.groovy b/Jenkinsfile.groovy index fc77851..9e772ad 100644 --- a/Jenkinsfile.groovy +++ b/Jenkinsfile.groovy @@ -72,5 +72,12 @@ pipeline { } } } + stage('Build Java 10') { + steps { + withMaven(maven: 'maven', jdk: 'JDK 10') { + sh "${mvn} clean verify -Djava.version=10" + } + } + } } } From 501fea9df247876beb471ba437b3636b9c8f997b Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 14 May 2018 19:03:26 +0100 Subject: [PATCH 3/4] CHANGELOG tidy up --- CHANGELOG | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 76b9414..b91076c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,17 +1,13 @@ CHANGELOG ========= -4.2.0 +4.1.0 ----- * EmptyLineSeparator: disabled * Upgrade `tiles-maven-plugin` to 2.11 * Upgrade `checkstyle` to 8.10 * Upgrade `sevntu-checkstyle` to 1.29.0 - -4.1.0 ------ - * Upgrade `secntu-checkstyle` to 1.27.0 * Upgrade `checkstyle` to 8.7 (properly now that it is supported by sevntu) From 5da70a384c1dc507648726e35caf575022a14a08 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 14 May 2018 19:49:56 +0100 Subject: [PATCH 4/4] jenkins: add check for dependency support Only update dependenciesSupportJDK when all dependencies are compatible, particularly lombok. Only run against a JDK when dependencies support it. This prevents failing builds when it isn't our code that is failing. --- Jenkinsfile.groovy | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile.groovy b/Jenkinsfile.groovy index 9e772ad..9c3189e 100644 --- a/Jenkinsfile.groovy +++ b/Jenkinsfile.groovy @@ -1,4 +1,5 @@ final String mvn = "mvn --batch-mode --update-snapshots --errors" +final dependenciesSupportJDK=9 pipeline { agent any @@ -66,6 +67,7 @@ pipeline { } } stage('Build Java 9') { + when { expression { dependenciesSupportJDK >= 9 } } steps { withMaven(maven: 'maven', jdk: 'JDK 9') { sh "${mvn} clean verify -Djava.version=9" @@ -73,6 +75,7 @@ pipeline { } } stage('Build Java 10') { + when { expression { dependenciesSupportJDK >= 10 } } steps { withMaven(maven: 'maven', jdk: 'JDK 10') { sh "${mvn} clean verify -Djava.version=10"