diff options
| author | Matt Rendina <mrendina@stsci.edu> | 2017-11-21 14:55:32 -0500 |
|---|---|---|
| committer | Matt Rendina <mrendina@stsci.edu> | 2017-11-21 14:55:32 -0500 |
| commit | 66734368bdf45af0cb910c7934443d773f34eb20 (patch) | |
| tree | 2ddff8a0444e7a4880a36e43374f530f1a5af4bc | |
| parent | 728e11549ceed0129db43c008b625f57aecf558b (diff) | |
| download | jscu_refactor-66734368bdf45af0cb910c7934443d773f34eb20.tar.gz | |
Test System.exit
| -rw-r--r-- | vars/jfile_utils.groovy | 16 |
1 files 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) { |
