From eb2cc9e7ecaaffcc192885ce91787701763c8fbc Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 21 Feb 2018 10:28:17 -0800 Subject: [PATCH] Enable Spring IO Platform checks in (Jenkins) CI build. --- Jenkinsfile | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 666993d..27f6824 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,27 +15,31 @@ try { node { checkout scm try { - sh "./gradlew clean check --refresh-dependencies --no-daemon" - } catch(Exception e) { + sh "./gradlew clean check --refresh-dependencies --no-daemon" + } + catch (Exception cause) { currentBuild.result = 'FAILED: check' - throw e - } finally { + throw cause + } + finally { junit '**/build/*-results/*.xml' } } } }, - sonar: { - stage('Sonar') { + springio: { + stage('Spring IO') { node { checkout scm - withCredentials([string(credentialsId: 'spring-sonar.login', variable: 'SONAR_LOGIN')]) { - try { - sh "./gradlew clean sonarqube -PexcludeProjects='**/samples/**' -Dsonar.host.url=$SPRING_SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN --refresh-dependencies --no-daemon" - } catch(Exception e) { - currentBuild.result = 'FAILED: sonar' - throw e - } + try { + sh "./gradlew clean springIoCheck -PplatformVersion=Cairo-BUILD-SNAPSHOT -PexcludeProjects='**/samples/**' --refresh-dependencies --no-daemon --stacktrace" + } + catch (Exception cause) { + currentBuild.result = 'FAILED: springio' + throw cause + } + finally { + junit '**/build/spring-io*-results/*.xml' } } }