Skip to content

Commit

Permalink
Change nightly labeler to run every 20min all day (#1113)
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero committed Feb 9, 2024
1 parent 34340b5 commit 0e3202f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 6 additions & 4 deletions jenkins-scripts/dsl/_configs_/Globals.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ class Globals
static CRON_EVERY_THREE_DAYS = 'H H * * H/3'
static CRON_HOURLY = 'H * * * *'
static CRON_ON_WEEKEND = 'H H * * 6-7'
// Run nightly scheduler during the nightly creation to be sure
// that any possible node killed is replaced. Starting -15min
// before CRON_NIGHTLY_NODES and evert 20min for 3 hours
static CRON_NIGHTLY_NODES = '*/20 9-11 * * *'
// Run nightly scheduler every 20 minutes being sure to
// run it at 9 just before the nightly creation.
static CRON_NIGHTLY_NODES = [
'*/20 9-23 * * *',
'*/20 0-8 * * *']

// Start the nightly generation 10 minutes after the nigthly node
// initial generation
static CRON_START_NIGHTLY = '10 9 * * *'
Expand Down
4 changes: 3 additions & 1 deletion jenkins-scripts/dsl/core.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ nightly_labeler.with
label Globals.nontest_label("master")

triggers {
cron(Globals.CRON_NIGHTLY_NODES)
Globals.CRON_NIGHTLY_NODES.each { cron_entry ->
cron(cron_entry)
}
}

steps
Expand Down

0 comments on commit 0e3202f

Please sign in to comment.