From 66734368bdf45af0cb910c7934443d773f34eb20 Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Tue, 21 Nov 2017 14:55:32 -0500 Subject: Test System.exit --- vars/jfile_utils.groovy | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vars/jfile_utils.groovy b/vars/jfile_utils.groovy index 9de646c..d190739 100644 --- a/vars/jfile_utils.groovy +++ b/vars/jfile_utils.groovy @@ -1,5 +1,10 @@ // Jenkinsfile utilities +// Clone the source repository and examine the most recent commit message. +// If a '[ci skip]' or '[skip ci]' directive is present, immediately abort the build +// terminate the job with a success code. +// If no skip directive is found, stash all the source files for efficient retrieval +// by subsequent nodes. def scm_checkout() { skip_job = 0 node("on-master") { @@ -11,20 +16,15 @@ def scm_checkout() { skip_job = 1 currentBuild.result = 'SUCCESS' println("\nBuild skipped due to commit message directive.\n") - return skip_job + System.exit(0) + //return skip_job } stash includes: '**/*', name: 'source_tree' } } - return skip_job + //return skip_job } -//if (skip_job == 1) { -// currentBuild.result = 'SUCCESS' -// println("\nBuild skipped due to commit message directive.\n") -// return -//} - def concurrent2(mylist) { for (build in mylist) { -- cgit