mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-01-03 05:48:43 +00:00
ci: add deploy jobs triggering gst-plugins-rs image updates
Those jobs will trigger a rebuild of gst-plugins-rs when our images are updated.
This commit is contained in:
parent
e40e23b82c
commit
0d2829d955
1 changed files with 53 additions and 1 deletions
|
@ -17,7 +17,7 @@
|
||||||
# Updating the nightly image should be done by simply running a scheduled ci
|
# Updating the nightly image should be done by simply running a scheduled ci
|
||||||
# pipeline on the upstream repo with the $UPDATE_NIGHTLY variable defined.
|
# pipeline on the upstream repo with the $UPDATE_NIGHTLY variable defined.
|
||||||
|
|
||||||
.templates_sha: &templates_sha acda94e139030dc2caa058118956225e55bbec5f
|
.templates_sha: &templates_sha 1f82c62c196cd53d168b74e85b0a19ea48c1e2b9
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- project: 'freedesktop/ci-templates'
|
- project: 'freedesktop/ci-templates'
|
||||||
|
@ -34,6 +34,7 @@ stages:
|
||||||
- "lint"
|
- "lint"
|
||||||
- "test"
|
- "test"
|
||||||
- "extras"
|
- "extras"
|
||||||
|
- "deploy"
|
||||||
|
|
||||||
.debian:10:
|
.debian:10:
|
||||||
variables:
|
variables:
|
||||||
|
@ -117,6 +118,57 @@ update-nightly:
|
||||||
- .dist-debian-container
|
- .dist-debian-container
|
||||||
- .debian:10-nightly
|
- .debian:10-nightly
|
||||||
|
|
||||||
|
# GST_PLUGINS_RS_TOKEN is a variable of type 'Var' defined in gstreamer-rs CI
|
||||||
|
# settings and containing a gst-plugins-rs pipeline trigger token
|
||||||
|
.plugins-update:
|
||||||
|
stage: deploy
|
||||||
|
script:
|
||||||
|
- |
|
||||||
|
# FDO_DISTRIBUTION_IMAGE still has indirections
|
||||||
|
- echo $FDO_DISTRIBUTION_IMAGE
|
||||||
|
- DISTRO_IMAGE=$(eval echo ${FDO_DISTRIBUTION_IMAGE})
|
||||||
|
- echo $DISTRO_IMAGE
|
||||||
|
# retrieve the infos from the registry
|
||||||
|
- JSON_IMAGE=$(skopeo inspect docker://$DISTRO_IMAGE)
|
||||||
|
- IMAGE_PIPELINE_ID=$(echo $JSON_IMAGE | jq -r '.Labels["fdo.pipeline_id"]')
|
||||||
|
- echo $IMAGE_PIPELINE_ID
|
||||||
|
- echo $CI_PIPELINE_ID
|
||||||
|
- |
|
||||||
|
if [[ x"$IMAGE_PIPELINE_ID" == x"$CI_PIPELINE_ID" ]]; then
|
||||||
|
echo "Image has been updated, notify gst-plugins-rs"
|
||||||
|
curl -X POST -F "token=$GST_PLUGINS_RS_TOKEN" -F "ref=fdo-template" -F "variables[UPDATE_IMG]=$UPDATE_IMG" https://gitlab.freedesktop.org/api/v4/projects/1400/trigger/pipeline
|
||||||
|
else
|
||||||
|
echo "Image has not been updated, ignore"
|
||||||
|
fi
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_REF_NAME == "master" && $CI_PROJECT_PATH == "gstreamer/gstreamer-rs"'
|
||||||
|
|
||||||
|
# Those jobs need to use another image as ours doesn't have 'skopeo'
|
||||||
|
# and it's not easily installable in Debian stable for now.
|
||||||
|
plugins-update-stable:
|
||||||
|
extends:
|
||||||
|
- .plugins-update
|
||||||
|
- .img-stable
|
||||||
|
image: registry.freedesktop.org/freedesktop/ci-templates/buildah:2020-03-04
|
||||||
|
variables:
|
||||||
|
UPDATE_IMG: "stable"
|
||||||
|
|
||||||
|
plugins-update-1-40:
|
||||||
|
extends:
|
||||||
|
- .plugins-update
|
||||||
|
- .img-1-40
|
||||||
|
image: registry.freedesktop.org/freedesktop/ci-templates/buildah:2020-03-04
|
||||||
|
variables:
|
||||||
|
UPDATE_IMG: "1-40"
|
||||||
|
|
||||||
|
plugins-update-nightly:
|
||||||
|
extends:
|
||||||
|
- .plugins-update
|
||||||
|
- .img-nightly
|
||||||
|
image: registry.freedesktop.org/freedesktop/ci-templates/buildah:2020-03-04
|
||||||
|
variables:
|
||||||
|
UPDATE_IMG: "nightly"
|
||||||
|
|
||||||
.cargo test:
|
.cargo test:
|
||||||
stage: "test"
|
stage: "test"
|
||||||
script:
|
script:
|
||||||
|
|
Loading…
Reference in a new issue