ci: Move to trigger jobs instead of REST calls

The REST calls no longer work, returning error 422. Move to trigger
jobs which seems to have been fixed. The down side is that we looses
the ability to run against user matching cerbero branch.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9224>
This commit is contained in:
Nicolas Dufresne 2025-06-16 11:10:32 -04:00
parent 97fec43422
commit 43d67a6557

View file

@ -1075,37 +1075,48 @@ build documentation:
- "subprojects/gstreamer/**/*" - "subprojects/gstreamer/**/*"
- "subprojects/gst-rtsp-server/**/*" - "subprojects/gst-rtsp-server/**/*"
# FIXME: Using trigger: causes permission issues, workaround using old REST API.
# https://gitlab.com/gitlab-org/gitlab/-/issues/341737 # FIXME: We used to automatically run against matching user branch
# whever that branch existed.
# See ci/gitlab/trigger_cerbero_pipline.py.
.cerbero trigger changes: &cerbero_trigger_changes
changes:
paths:
- ".gitlab-ci.yml"
- "ci/gitlab/*.py"
- "subprojects/gst-devtools/**/*"
- "subprojects/gst-editing-services/**/*"
- "subprojects/gst-libav/**/*"
- "subprojects/gst-plugins-bad/**/*"
- "subprojects/gst-plugins-base/**/*"
- "subprojects/gst-plugins-good/**/*"
- "subprojects/gst-plugins-ugly/**/*"
- "subprojects/gst-python/**/*"
- "subprojects/gstreamer/**/*"
- "subprojects/gst-rtsp-server/**/*"
- "subprojects/gst-examples/**/*"
cerbero trigger: cerbero trigger:
stage: build stage: build
timeout: '4h' trigger:
tags: project: gstreamer/cerbero
- placeholder-job branch: main
image: python:alpine strategy: depend
needs: needs:
- "trigger" - "trigger"
script: variables:
- pip install python-gitlab CI_GSTREAMER_PATH: '$CI_PROJECT_PATH'
- python ci/gitlab/trigger_cerbero_pipeline.py CI_GSTREAMER_REF_NAME: '$CI_COMMIT_REF_NAME'
CI_GSTREAMER_TRIGGERED: 'true'
rules: rules:
- if: '$MESON_COMMIT' - if: '$MESON_COMMIT'
# Never run post merge # Never run post merge
- if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH' - if: '$CI_PROJECT_NAMESPACE == "gstreamer" && $CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
when: never when: never
- changes: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
paths: # For merge reqest, we want to test user branch
- ".gitlab-ci.yml" <<: *cerbero_trigger_changes
- "ci/gitlab/*.py" variables:
- "subprojects/gst-devtools/**/*" CI_GSTREAMER_PATH: '$CI_MERGE_REQUEST_SOURCE_PROJECT_PATH'
- "subprojects/gst-editing-services/**/*" CI_GSTREAMER_REF_NAME: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME'
- "subprojects/gst-libav/**/*" - <<: *cerbero_trigger_changes
- "subprojects/gst-plugins-bad/**/*"
- "subprojects/gst-plugins-base/**/*"
- "subprojects/gst-plugins-good/**/*"
- "subprojects/gst-plugins-ugly/**/*"
- "subprojects/gst-python/**/*"
- "subprojects/gstreamer/**/*"
- "subprojects/gst-rtsp-server/**/*"
- "subprojects/gst-examples/**/*"