From 0e3202ff4a92c2d1659b003794d7819579c7610f Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Fri, 9 Feb 2024 16:04:26 +0100 Subject: [PATCH] Change nightly labeler to run every 20min all day (#1113) Signed-off-by: Jose Luis Rivero --- jenkins-scripts/dsl/_configs_/Globals.groovy | 10 ++++++---- jenkins-scripts/dsl/core.dsl | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/jenkins-scripts/dsl/_configs_/Globals.groovy b/jenkins-scripts/dsl/_configs_/Globals.groovy index 3da1e8c38..d0e2ee9ca 100644 --- a/jenkins-scripts/dsl/_configs_/Globals.groovy +++ b/jenkins-scripts/dsl/_configs_/Globals.groovy @@ -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 * * *' diff --git a/jenkins-scripts/dsl/core.dsl b/jenkins-scripts/dsl/core.dsl index 4976a3835..0e8234b16 100644 --- a/jenkins-scripts/dsl/core.dsl +++ b/jenkins-scripts/dsl/core.dsl @@ -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