[Buildroot] [PATCH 2/2] support/scripts: handle scheduled pipelines
Yann E. MORIN
yann.morin.1998 at free.fr
Mon Sep 21 21:08:42 UTC 2020
We currently only handle triggerred pipelines, i.e. pipelines that
have been created via the PAI with a token.
However, the weekly trigger is not a trigger, it is a schedule.
Unbeknownst to us, it seems the behaviour of scheduled pipeline has
changed, and they are no longer treated as a triggerred pipeline, and
the corresponding variable is not set; instead, the scheduled property
is reflected in the CI_PIPELINE_SOURCE variable, that is aptly set to
'schedule'.
Use that to recognise our weekly scheduled pipeline.
Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
---
support/scripts/generate-gitlab-ci-yml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/support/scripts/generate-gitlab-ci-yml b/support/scripts/generate-gitlab-ci-yml
index faa52e85b2..01d850d09c 100755
--- a/support/scripts/generate-gitlab-ci-yml
+++ b/support/scripts/generate-gitlab-ci-yml
@@ -52,6 +52,9 @@ gen_defconfigs() {
elif [ -n "${CI_PIPELINE_TRIGGERED}" ]; then
# For pipeline created by using a trigger token.
template=base
+ elif [ "${CI_PIPELINE_SOURCE}" = "schedule" ]; then
+ # For scheduled pipelines
+ template=base
else
case "${CI_COMMIT_REF_NAME}" in
# For master, next, and maintenance branches, only check the defconfigs
@@ -94,6 +97,9 @@ gen_tests() {
elif [ -n "${CI_PIPELINE_TRIGGERED}" ]; then
# For pipeline created by using a trigger token.
run_tests=true
+ elif [ "${CI_PIPELINE_SOURCE}" = "schedule" ]; then
+ # For scheduled pipelines
+ run_tests=true
else
case "${CI_COMMIT_REF_NAME}" in
# For the branch or tag name named *-runtime-tests, create a pipeline.
--
2.20.1
More information about the buildroot
mailing list