Skip to content

Commit e039035

Browse files
stephendonnerKimberly Sereduck
authored andcommitted
Fix cron-running logic w/master branch/Jenkins (#110)
1 parent 0fda102 commit e039035

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Jenkinsfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env groovy
22

3+
def branch = env.BRANCH_NAME ?: 'master'
4+
35
/** Desired capabilities */
46
def capabilities = [
57
browserName: 'Firefox',
@@ -13,8 +15,8 @@ pipeline {
1315
lib('fxtest@1.9')
1416
}
1517
triggers {
16-
pollSCM(env.BRANCH_NAME == 'master' ? 'H/5 * * * *' : '')
17-
cron(env.BRANCH_NAME == 'master' ? 'H * * * *' : '')
18+
pollSCM(branch == 'master' ? 'H/5 * * * *' : '')
19+
cron(branch == 'master' ? 'H * * * *' : '')
1820
}
1921
options {
2022
ansiColor('xterm')

0 commit comments

Comments
 (0)