diff options
author | Matt Rendina <rendinam@users.noreply.github.com> | 2018-07-20 14:25:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-20 14:25:21 -0400 |
commit | b0c40b5e8eee2f43bb249e594ee7d46463c5d0c8 (patch) | |
tree | 2f5b833fdc764946588d86d8f44e25615fc0fdac | |
parent | d2ece63ab25eb131cb4240bc78401dd8e7ee43a8 (diff) | |
download | jscu_refactor-b0c40b5e8eee2f43bb249e594ee7d46463c5d0c8.tar.gz |
Change default argument construction to a map type
-rw-r--r-- | vars/utils.groovy | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vars/utils.groovy b/vars/utils.groovy index bfc90f9..c0d32a4 100644 --- a/vars/utils.groovy +++ b/vars/utils.groovy @@ -11,13 +11,14 @@ import org.apache.commons.io.FilenameUtils // terminate the job with a success code. // If no skip directive is found, or skip_disable is true, stash all the // source files for efficient retrieval by subsequent nodes. -def scm_checkout(skip_disable=false) { +//def scm_checkout(skip_disable=false) { +def scm_checkout(args = ['skip_disable':false]) { skip_job = 0 node("on-master") { stage("Setup") { checkout(scm) - println("skip_disable = ${skip_disable.toString()}") - if (skip_disable.toString() == 'false' || skip_disable == null) { + println("args['skip_disable'] = ${args['skip_disable']}") + if (args['skip_disable'] == false) { // Obtain the last commit message and examine it for skip directives. logoutput = sh(script:"git log -1 --pretty=%B", returnStdout: true).trim() println(logoutput) |