From patchwork Fri Mar 10 09:53:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Hoyes X-Patchwork-Id: 1755123 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PY1cZ2xDXz2469 for ; Fri, 10 Mar 2023 20:54:54 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ADC2285A36; Fri, 10 Mar 2023 10:54:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id CA22D85EED; Fri, 10 Mar 2023 10:54:38 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 6D42385EE2 for ; Fri, 10 Mar 2023 10:54:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peter.hoyes@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 58EFFC14; Fri, 10 Mar 2023 01:55:13 -0800 (PST) Received: from e125920.arm.com (unknown [10.57.79.254]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 213903F5A1; Fri, 10 Mar 2023 01:54:29 -0800 (PST) From: Peter Hoyes To: u-boot@lists.denx.de Cc: Peter Hoyes Subject: [PATCH 1/2] CI: Allow job tag to be optionally set globally Date: Fri, 10 Mar 2023 09:53:02 +0000 Message-Id: <20230310095303.671951-2-peter.hoyes@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230310095303.671951-1-peter.hoyes@arm.com> References: <20230310095303.671951-1-peter.hoyes@arm.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean From: Peter Hoyes The default behavior of Gitlab runners is to only run jobs which match the configured tag, although there is an option to run untagged jobs [1]. To support running the CI in more complex environments where different types of runners may be present that support different tags, allow the DEFAULT_TAG for all jobs in the pipeline to be set globally using an environment variable. An empty default value is provided to retain support for untagged runners. [1] https://docs.gitlab.com/ee/ci/runners/configure_runners.html#use-tags-to-control-which-jobs-a-runner-can-run Signed-off-by: Peter Hoyes Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 272d69e220..d54694e016 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,12 @@ # SPDX-License-Identifier: GPL-2.0+ +variables: + DEFAULT_TAG: "" + +default: + tags: + - ${DEFAULT_TAG} + # Grab our configured image. The source for this is found # in the u-boot tree at tools/docker/Dockerfile image: trini/u-boot-gitlab-ci-runner:jammy-20230126-10Feb2023