aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vars/jfile_utils.groovy16
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) {