diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2023-08-13 00:26:11 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2023-09-08 21:06:39 +0000 |
commit | e1e22daa6b9a003a95e3669be81daa189d67f6b2 (patch) | |
tree | c4a6ebc29c1a34a21006b9c7914a98baa5e5f2f1 | |
parent | ed34d973f803f99647b40859691bcb71f00eb239 (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.yml | 2 | ||||
-rwxr-xr-x | ci/cerbero_setup.sh | 7 |
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 |