Skip to content

Commit b0213e9

Browse files
authored
Merge pull request #200 from ChrisPark89/fix/jenkins
Set a schedule build for master branch at 2AM everyday
2 parents 53140ad + 7c7ab30 commit b0213e9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Jenkinsfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def UNIT_RESULTS = "${TEST_RESULTS_FOLDER}/unit"
6262
/**
6363
* The location of the system test results
6464
*/
65-
def SYSTEM_RESULTS = "${TEST_RESULTS_FOLDER}/system"
65+
def SYSTEM_RESULTS = "${TEST_RESULTS_FOLDER}/system"
6666

6767
/**
6868
* The name of the master branch
@@ -92,6 +92,10 @@ def ARTIFACTORY_CREDENTIALS_ID = "c8e3aa62-5eef-4e6b-8a3f-aa1006a7ef01"
9292
// much impossible to have conditional options based on the branch :/
9393
def opts = []
9494

95+
// Setup a schedule to run build periodically
96+
// Run a build at 2.00AM everyday
97+
def CRON_STRING = BRANCH_NAME == MASTER_BRANCH ? "H 2 * * *" : ""
98+
9599
if (RELEASE_BRANCHES.contains(BRANCH_NAME)) {
96100
// Only keep 20 builds
97101
opts.push(buildDiscarder(logRotator(numToKeepStr: '20')))
@@ -115,6 +119,10 @@ pipeline {
115119
skipDefaultCheckout true
116120
}
117121

122+
triggers {
123+
cron(CRON_STRING)
124+
}
125+
118126
environment {
119127
// Environment variable for flow control. Indicates if the git source was updated by the pipeline.
120128
GIT_SOURCE_UPDATED = "false"

0 commit comments

Comments
 (0)