ci: Add a dummy trigger job/stage

This is to avoid triggering docker images for no reason, and bring back
running gst-indent always.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1054>
This commit is contained in:
Nicolas Dufresne 2021-10-05 09:27:50 -04:00 committed by GStreamer Marge Bot
parent 88ceb249be
commit 8f39de3283

View file

@ -2,6 +2,7 @@ include:
- remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/7ea696055e322cc7aa4bcbe5422b56a198c4bdff/templates/ci-fairy.yml" - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/7ea696055e322cc7aa4bcbe5422b56a198c4bdff/templates/ci-fairy.yml"
stages: stages:
- 'trigger'
- 'build docker' - 'build docker'
- 'preparation' - 'preparation'
- 'pre-build' - 'pre-build'
@ -103,6 +104,25 @@ default:
- 'api_failure' - 'api_failure'
interruptible: true interruptible: true
# This is an empty job that is used to trigger the pipeline.
trigger:
image: alpine:latest
stage: 'trigger'
script:
- echo "Trigger job done, now running the pipeline."
rules:
# If the MR is assigned to the Merge bot, trigger the pipeline automatically
- if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
# When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
# to avoid wasting CI resources
- if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
when: 'manual'
allow_failure: false
# If this matches, it means the pipeline is running against either the main
# or a stable branch, so make it manual
- if: '$CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
when: 'manual'
# Script to check if a docker image exists in the upstream registry # Script to check if a docker image exists in the upstream registry
# and if so copy it to the forked registry so we can use it # and if so copy it to the forked registry so we can use it
@ -258,6 +278,8 @@ default:
fedora amd64 docker: fedora amd64 docker:
stage: "build docker" stage: "build docker"
needs:
- "trigger"
variables: variables:
REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX" REPO_SUFFIX: "$FEDORA_AMD64_SUFFIX"
TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH" TAG: "$FEDORA_TAG-$GST_UPSTREAM_BRANCH"
@ -268,6 +290,8 @@ fedora amd64 docker:
gst-indent amd64 docker: gst-indent amd64 docker:
stage: "build docker" stage: "build docker"
# Do not depend on the trigger, as we want to run indent always
needs: []
variables: variables:
REPO_SUFFIX: "$INDENT_AMD64_SUFFIX" REPO_SUFFIX: "$INDENT_AMD64_SUFFIX"
TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH" TAG: "$INDENT_TAG-$GST_UPSTREAM_BRANCH"
@ -278,6 +302,8 @@ gst-indent amd64 docker:
windows amd64 docker: windows amd64 docker:
stage: "build docker" stage: "build docker"
needs:
- "trigger"
variables: variables:
# Unlike the buildah/linux jobs, this file # Unlike the buildah/linux jobs, this file
# needs to be relative to docker/windows/ subdir # needs to be relative to docker/windows/ subdir
@ -358,6 +384,9 @@ windows rust amd64 docker minimum supported version:
gst indent: gst indent:
image: $INDENT_IMAGE image: $INDENT_IMAGE
stage: 'preparation' stage: 'preparation'
needs:
- job: 'gst-indent amd64 docker'
artifacts: false
script: script:
# man indent. grep RETURN VALUE, grab a beer on my behalf... # man indent. grep RETURN VALUE, grab a beer on my behalf...
- indent --version || true - indent --version || true
@ -371,19 +400,6 @@ gst indent:
exit 1 exit 1
fi fi
rules:
# If the MR is assigned to the Merge bot, trigger the pipeline automatically
- if: '$CI_MERGE_REQUEST_ASSIGNEES == "gstreamer-merge-bot"'
# When the assignee isn't the merge bot, require an explicit action to trigger the pipeline
# to avoid wasting CI resources
- if: '$CI_MERGE_REQUEST_ASSIGNEES != "gstreamer-merge-bot"'
when: 'manual'
allow_failure: false
# If this matches, it means the pipeline is running against either the main
# or a stable branch, so make it manual
- if: '$CI_COMMIT_BRANCH == $GST_UPSTREAM_BRANCH'
when: 'manual'
# #
# Check "allow-edit" checkbox on merge requests with ci-fairy # Check "allow-edit" checkbox on merge requests with ci-fairy
# #
@ -431,7 +447,7 @@ check allow-edit:
extends: extends:
- '.build_ccache_vars' - '.build_ccache_vars'
needs: needs:
- "gst indent" - "trigger"
# Taking into account the slowest shared runner + time needed to upload the binaries to artifacts # Taking into account the slowest shared runner + time needed to upload the binaries to artifacts
# Also need to take into account I/O of pulling docker images and uploading artifacts # Also need to take into account I/O of pulling docker images and uploading artifacts
timeout: '45min' timeout: '45min'
@ -502,6 +518,8 @@ check allow-edit:
.build fedora x86_64: .build fedora x86_64:
extends: '.build' extends: '.build'
image: $FEDORA_IMAGE image: $FEDORA_IMAGE
needs:
- "fedora amd64 docker"
variables: variables:
MESON_ARGS: *simple_build MESON_ARGS: *simple_build
rules: rules:
@ -511,6 +529,8 @@ check allow-edit:
build nodebug fedora x86_64: build nodebug fedora x86_64:
extends: '.build' extends: '.build'
image: $FEDORA_IMAGE image: $FEDORA_IMAGE
needs:
- "fedora amd64 docker"
variables: variables:
MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}" MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dsharp=enabled -Dgstreamer:gst_debug=false -Domx=enabled -Dgst-omx:target=generic ${MESON_BUILDTYPE_ARGS} ${MESON_GST_WERROR}"
@ -538,7 +558,7 @@ build clang fedora x86_64:
- 'windows' - 'windows'
- '1809' - '1809'
needs: needs:
- "gst indent" - "windows amd64 docker"
timeout: '45min' timeout: '45min'
variables: variables:
MESON_ARGS: > MESON_ARGS: >
@ -618,7 +638,7 @@ build msys2 :
extends: extends:
- '.build_ccache_vars' - '.build_ccache_vars'
needs: needs:
- "gst indent" - "trigger"
variables: variables:
MESON_ARGS: *simple_build MESON_ARGS: *simple_build
@ -665,6 +685,8 @@ build msys2 :
.test fedora x86_64: .test fedora x86_64:
image: $FEDORA_IMAGE image: $FEDORA_IMAGE
needs:
- "fedora amd64 docker"
extends: '.test' extends: '.test'
tags: ['gstreamer'] tags: ['gstreamer']
@ -878,7 +900,7 @@ build documentation:
- '.documentation' - '.documentation'
stage: build stage: build
needs: needs:
- "gst indent" - "trigger"
stage: build stage: build
rules: rules:
@ -904,6 +926,8 @@ build documentation:
cerbero trigger: cerbero trigger:
stage: build stage: build
image: $FEDORA_IMAGE image: $FEDORA_IMAGE
needs:
- "fedora amd64 docker"
script: script:
- python3 -m pip install --user python-gitlab - python3 -m pip install --user python-gitlab
- ci/gitlab/trigger_cerbero_pipeline.py - ci/gitlab/trigger_cerbero_pipeline.py
@ -926,4 +950,4 @@ cerbero trigger:
- subprojects/gst-python/**/* - subprojects/gst-python/**/*
- subprojects/gstreamer/**/* - subprojects/gstreamer/**/*
- subprojects/gst-rtsp-server/**/* - subprojects/gst-rtsp-server/**/*
- subprojects/gst-examples/**/* - subprojects/gst-examples/**/*