From d4c7a56539d0bdb6fccf60af94d528613cbc7c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 8 Jun 2023 17:40:14 +0100 Subject: gitlab: centralize the container tag name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We use a fixed container tag of 'latest' so that contributors' forks don't end up with an ever growing number of containers as they work on throwaway feature branches. This fixed tag causes problems running CI upstream in stable staging branches, however, because the stable staging branch will publish old container content that clashes with that needed by primary staging branch. This makes it impossible to reliably run CI pipelines in parallel in upstream for different staging branches. This introduces $QEMU_CI_CONTAINER_TAG global variable as a way to change which tag container publishing uses. Initially it can be set by contributors as a git push option if they want to override the default use of 'latest' eg git push gitlab -o ci.variable=QEMU_CONTAINER_TAG=fish this is useful if contributors need to run pipelines for different branches concurrently in their forks. Reviewed-by: Michael Tokarev Reviewed-by: Richard Henderson Signed-off-by: Daniel P. Berrangé Message-Id: <20230608164018.2520330-2-berrange@redhat.com> Signed-off-by: Thomas Huth --- docs/devel/ci-jobs.rst.inc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/devel') diff --git a/docs/devel/ci-jobs.rst.inc b/docs/devel/ci-jobs.rst.inc index 1f28fec..f725378 100644 --- a/docs/devel/ci-jobs.rst.inc +++ b/docs/devel/ci-jobs.rst.inc @@ -70,6 +70,11 @@ in a handful of namespaces repository CI settings, or as git push variables, to influence which jobs get run in a pipeline + * QEMU_CI_CONTAINER_TAG - the tag used to publish containers + in stage 1, for use by build jobs in stage 2. Defaults to + 'latest', but if running pipelines for different branches + concurrently, it should be overridden per pipeline. + * nnn - other misc variables not falling into the above categories, or using different names for historical reasons and not yet converted. -- cgit v1.1 From 1ddd2ff9cd873dd7d634a0b6296e91c6583b47e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 8 Jun 2023 17:40:15 +0100 Subject: gitlab: allow overriding name of the upstream repository MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CI rules have special logic for what happens in upstream. To enable contributors who modify CI rules to test this logic, however, they need to be able to override which repo is considered upstream. This introduces the 'QEMU_CI_UPSTREAM' variable git push gitlab -o ci.variable=QEMU_CI_UPSTREAM=berrange to make it look as if my namespace is the actual upstream. Namespace in this context refers to the path fragment in gitlab URLs that is above the repository. Typically this will be the contributor's gitlab login name. Reviewed-by: Richard Henderson Reviewed-by: Michael Tokarev Signed-off-by: Daniel P. Berrangé Message-Id: <20230608164018.2520330-3-berrange@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- docs/devel/ci-jobs.rst.inc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs/devel') diff --git a/docs/devel/ci-jobs.rst.inc b/docs/devel/ci-jobs.rst.inc index f725378..3f6802d 100644 --- a/docs/devel/ci-jobs.rst.inc +++ b/docs/devel/ci-jobs.rst.inc @@ -75,6 +75,12 @@ in a handful of namespaces 'latest', but if running pipelines for different branches concurrently, it should be overridden per pipeline. + * QEMU_CI_UPSTREAM - gitlab namespace that is considered to be + the 'upstream'. This defaults to 'qemu-project'. Contributors + may choose to override this if they are modifying rules in + base.yml and need to validate how they will operate when in + an upstream context, as opposed to their fork context. + * nnn - other misc variables not falling into the above categories, or using different names for historical reasons and not yet converted. -- cgit v1.1