diff options
-rw-r--r-- | Jenkinsfile | 5 | ||||
-rw-r--r-- | vars/utils.groovy | 22 |
2 files changed, 14 insertions, 13 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index df5255b..4cc967a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,4 @@ -//@Library('utils@subdir') _ - +//@Library('utils@subdirfix') _ // [skip ci] and [ci skip] have no effect here. if (utils.scm_checkout(['skip_disable':true])) return @@ -7,7 +6,7 @@ if (utils.scm_checkout(['skip_disable':true])) return // Allow modification of the job configuration, affects all relevant build configs. // Pass this object in the argument list to the`run()` function below to apply these settings to the job's execution. jobconfig = new JobConfig() -jobconfig.post_test_summary = true +//jobconfig.post_test_summary = true //jobconfig.credentials = ['SECRET_VALUE'] //jobconfig.enable_env_publication = true //jobconfig.publish_env_on_success_only = false diff --git a/vars/utils.groovy b/vars/utils.groovy index 2232325..2fb8fe5 100644 --- a/vars/utils.groovy +++ b/vars/utils.groovy @@ -58,16 +58,18 @@ def scm_checkout(args = ['skip_disable':false]) { sh "mkdir clone" stat = sh(script: "shopt -s dotglob; mv * clone", returnStatus: true) 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() - if (logoutput.contains("[ci skip]") || logoutput.contains("[skip ci]")) { - skip_job = 1 - currentBuild.result = 'SUCCESS' - println("\nBuild skipped due to commit message directive.\n") - return skip_job + dir('clone') { + 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() + if (logoutput.contains("[ci skip]") || logoutput.contains("[skip ci]")) { + skip_job = 1 + currentBuild.result = 'SUCCESS' + println("\nBuild skipped due to commit message directive.\n") + return skip_job + } } - } + } //end dir(... stash includes: '**/*', name: 'source_tree', useDefaultExcludes: false } } @@ -310,7 +312,7 @@ def publishCondaEnv(jobconfig, test_info) { } else { pushToArtifactory("conda_env_dump_*", pub_repo) } - } + } // end dir(... } } |