summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2023-08-13 00:26:11 +0100
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2023-09-08 21:06:39 +0000
commite1e22daa6b9a003a95e3669be81daa189d67f6b2 (patch)
treec4a6ebc29c1a34a21006b9c7914a98baa5e5f2f1
parented34d973f803f99647b40859691bcb71f00eb239 (diff)
ci: trigger pipeline automatically if it was created by a schedule
.. but don't regen and upload caches for scheduled pipelines on main. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1250>
-rw-r--r--.gitlab-ci.yml2
-rwxr-xr-xci/cerbero_setup.sh7
2 files changed, 7 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 89caa1b1..e3192aab 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -86,6 +86,8 @@ default:
rules:
# If this pipeline is triggered from gstreamer, trigger the pipeline automatically
- if: '$CI_PIPELINE_SOURCE == "pipeline"'
+ # If this pipeline is triggered by a schedule, trigger the pipeline automatically
+ - if: '$CI_PIPELINE_SOURCE == "schedule"'
# If this matches, it means the pipeline is running against either the main
# or a stable branch, so make it automatic cause they need to update artifacts,
# like the docs site or cerbero deps
diff --git a/ci/cerbero_setup.sh b/ci/cerbero_setup.sh
index e522ed14..7c558ef8 100755
--- a/ci/cerbero_setup.sh
+++ b/ci/cerbero_setup.sh
@@ -145,8 +145,11 @@ cerbero_deps_script() {
# doing something silly like [[ -n ${CERBERO_...} ]] because it will get
# printed in the CI logs due to set -x
if env | grep -q -e CERBERO_PRIVATE_SSH_KEY; then
- time $CERBERO $CERBERO_ARGS gen-cache --branch "${GST_UPSTREAM_BRANCH}"
- time $CERBERO $CERBERO_ARGS upload-cache --branch "${GST_UPSTREAM_BRANCH}"
+ # Don't generate and upload caches for scheduled pipelines on main branch
+ if [[ "x${CI_PIPELINE_SOURCE}" != "xschedule" ]]; then
+ time $CERBERO $CERBERO_ARGS gen-cache --branch "${GST_UPSTREAM_BRANCH}"
+ time $CERBERO $CERBERO_ARGS upload-cache --branch "${GST_UPSTREAM_BRANCH}"
+ fi
fi
cerbero_package_and_check