From d448639b6d380ec12bfd423c17e068dacc776328 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Thu, 2 Nov 2023 03:10:55 +0200 Subject: [PATCH] ci: Allow to run scheduled pipelines While everything that's merged needs to have passed CI, the testsuite result are not as consistent as we'd like and sometimes regress. It's nice to have have a pipeline hitory of the tests results to make it easier to spot regressions that might have caused racy/flaky tests. Part-of: --- .gitlab-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 69c26efb49..1381fb0b9a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,6 +67,9 @@ variables: workflow: # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + variables: + GIT_FETCH_EXTRA_FLAGS: '--no-tags' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' variables: GIT_FETCH_EXTRA_FLAGS: '--no-tags' @@ -102,6 +105,8 @@ trigger: script: - echo "Trigger job done, now running the pipeline." rules: + # If this pipeline is triggered by a schedule, run automatically + - if: $CI_PIPELINE_SOURCE == "schedule" # If the MR is assigned to the Merge bot, trigger the pipeline automatically - if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"' # Require explicit action to trigger tests post merge, but we want to