From 242e00b05a4521930f43a64d3386cc2970dff378 Mon Sep 17 00:00:00 2001 From: Stephen Donner Date: Thu, 19 Jul 2018 12:54:05 -0700 Subject: [PATCH] Fix cron-running logic w/master branch/Jenkins --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 108d6ab..aaa5af3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,7 @@ #!/usr/bin/env groovy +def branch = env.BRANCH_NAME ?: 'master' + /** Desired capabilities */ def capabilities = [ browserName: 'Firefox', @@ -13,8 +15,8 @@ pipeline { lib('fxtest@1.9') } triggers { - pollSCM(env.BRANCH_NAME == 'master' ? 'H/5 * * * *' : '') - cron(env.BRANCH_NAME == 'master' ? 'H * * * *' : '') + pollSCM(branch == 'master' ? 'H/5 * * * *' : '') + cron(branch == 'master' ? 'H * * * *' : '') } options { ansiColor('xterm')