From 71392b2461244860ec3a71b4e5cc221b524cb842 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 20 Aug 2018 16:07:34 -0700 Subject: [PATCH] Reconfigure Jenkins build pipeline timeouts at the stage level. --- Jenkinsfile | 56 ++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 14e51ef..8fa39e6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,41 +9,41 @@ def SUCCESS = hudson.model.Result.SUCCESS.toString() currentBuild.result = SUCCESS -pipeline { - options { - timeout(time: 10, unit: 'MINUTES') - } -} - try { parallel check: { stage('Check') { - node { - checkout scm - try { - sh "./gradlew clean check --refresh-dependencies --no-daemon" - } - catch (Exception cause) { - currentBuild.result = 'FAILED: check' - throw cause - } - finally { - junit '**/build/*-results/*.xml' - } - } + timeout(time: 10, unit: 'MINUTES') { + node { + checkout scm + try { + sh "./gradlew clean check --refresh-dependencies --no-daemon" + } + catch (Exception cause) { + currentBuild.result = 'FAILED: check' + throw cause + } + finally { + junit '**/build/*-results/*.xml' + } + } + } } }, springio: { stage('Spring IO') { - node { - checkout scm - try { - sh "./gradlew clean springIoCheck -PplatformVersion=Cairo-BUILD-SNAPSHOT -PexcludeProjects='**/samples/**' --refresh-dependencies --no-daemon --stacktrace" - } catch(Exception e) { - currentBuild.result = 'FAILED: springio' - throw e - } finally { - junit '**/build/spring-io*-results/*.xml' + timeout(time: 10, unit: 'MINUTES') { + node { + checkout scm + try { + sh "./gradlew clean springIoCheck -PplatformVersion=Cairo-BUILD-SNAPSHOT -PexcludeProjects='**/samples/**' --refresh-dependencies --no-daemon --stacktrace" + } + catch(Exception e) { + currentBuild.result = 'FAILED: springio' + throw e + } + finally { + junit '**/build/spring-io*-results/*.xml' + } } } }