From 008bae5ceeb378f294c3b8ab8cfc538b49ef2644 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Wed, 1 Nov 2023 10:10:01 -0500 Subject: [PATCH] bci2: Allow setting custom schedule The `buildContainerImage2` function now accepts an optional `schedule` argument. If specified, the value will be used as the cron expression for triggering a build periodically. --- vars/buildContainerImage2.groovy | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vars/buildContainerImage2.groovy b/vars/buildContainerImage2.groovy index 0d305e3..f9db4d9 100644 --- a/vars/buildContainerImage2.groovy +++ b/vars/buildContainerImage2.groovy @@ -1,15 +1,16 @@ // vim: set sw=4 sts=4 ts=4 et : def call(args) { - properties([ - pipelineTriggers([cron('H H H * *')]) - ]) - def registry = args?.registry def project = args?.project def name = args?.name def tag = args?.tag def archlist = args?.archlist + def schedule = args?.schedule + + properties([ + pipelineTriggers([cron(schedule ?: 'H H H * *')]) + ]) if (registry == null) { registry = 'git.pyrocufflink.net'