gitlab-ci.d/custom-runners: Improve rules for the staging branch
commitc5dd0f03423c8b614147778547a3a58525d9eb94
authorThomas Huth <thuth@redhat.com>
Wed, 28 Jul 2021 17:38:57 +0000 (28 19:38 +0200)
committerThomas Huth <thuth@redhat.com>
Thu, 29 Jul 2021 06:04:25 +0000 (29 08:04 +0200)
treed4870ee3e8c3065c81787149f1e57ee0ef7ee53e
parente37264ebe34fe80f7ef3ac649408fd7845c82c65
gitlab-ci.d/custom-runners: Improve rules for the staging branch

If maintainers are currently pushing to a branch called "staging"
in their repository, they are ending up with some stuck jobs - unless
they have a s390x CI runner machine available. That's ugly, we should
make sure that the related jobs are really only started if such a
runner is available. So let's only run these jobs if it's the
"staging" branch of the main repository of the QEMU project (where
we can be sure that the s390x runner is available), or if the user
explicitly set a S390X_RUNNER_AVAILABLE variable in their CI configs
to declare that they have such a runner available, too.

Fixes: 4799c21023 ("Jobs based on custom runners: add job definitions ...")
Message-Id: <20210728173857.497523-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
.gitlab-ci.d/custom-runners.yml