Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp20024lqe; Tue, 26 Mar 2024 18:36:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVih0ZsHEbBeJ6utARvo8gZwzIdu+l+ADUDYIwBrddKJcZ5uL4+/73eHBBN/wkc1lNCl5oXop8DYATdvlDsmjjXmAjO7NxYDa2GxeevWQ== X-Google-Smtp-Source: AGHT+IE4svZf4ViJyZu7fKxB5i/KvARYMC4A/1WxlPAyO88SlDFm+CF38LCAQlk2zLIKVfETyO5K X-Received: by 2002:a05:6a20:734d:b0:1a3:c8c3:ca51 with SMTP id v13-20020a056a20734d00b001a3c8c3ca51mr3107343pzc.62.1711503385095; Tue, 26 Mar 2024 18:36:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711503385; cv=pass; d=google.com; s=arc-20160816; b=czRUP+MtvIX4CRi1G5mWRxHLEVZk77JuhHDH7/VoNcnMWxjN1bS3dn7eSQ8rCR/xt/ BFyb2XFM1NTNHaR6+l5De8JHf/Tcm985Ehogfwak/Hq6nhEXWhjnrZoEXHpvFG7a5Be4 8bjYWzuyfitj3hHwR6/0eQguz1Vk8xyTkoVWG/SDGD+QzV4IaKUYuXZbgFYH48sjlSvO UUlNBKGPDxmZ4+RMfmeIX9IyEtoge4gGvNLp17xYWjGVj+jfXNa6dq1EE379r8KDdW9i sFYU+yn9UKFAl7ZhibD9XIt8mEMKVwTPY9d66QlkojmBtv3ZOnDfIU+ZOkNMfBUwkjrZ 8LGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=iYPTOunHLd/Diy0hNlVVbA0CQwtG77CQYjtLHeiLuNo=; fh=AizQkxG+gOzj7YO7hSVlOQEbsPZ2jeDOylVXsaAyDFw=; b=o5SFH26n1Snp1AycXx3XJK1I+hi4hoVaonyuXTuvkn/8MO06sQx8AaZrEBWJl+k0HS pu9h9nXSA6c/s5zSxVgx/Wfn9bG2xSm9kdEKGO2cVBZ9Vayqa53+Okt3FlBb6J2cl21Y i2kd9tb4Dez5Cwy3x3aj2nOQGRj5Aw8grx0V82n+Bhz/zCu5bWL2jzz1vvYPPQiP+hSB 4ZnCyB66B4qcRVrS2oSDy47sbt5EKQdy/XKhWKOpobIU+tkFduEIcPvd0fgteSsZnGNK K/v2xrI9kX48Y0kRrSKLNMn0LNH8/dsFzr2QZwCG86jqmDxitYLlm+ruGkXSOyg2klh5 wvtA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Eu3X/HBi"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-120178-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120178-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g8-20020a056a0023c800b006eab1ecda6esi4020764pfc.402.2024.03.26.18.36.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 18:36:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120178-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Eu3X/HBi"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-120178-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120178-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B030C2C778E for ; Wed, 27 Mar 2024 01:36:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B341B1CD3B; Wed, 27 Mar 2024 01:36:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Eu3X/HBi" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA6461862C for ; Wed, 27 Mar 2024 01:36:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711503378; cv=none; b=I+riCUFWfUmXJ2yKCE7JZKuzken1tQ4zTxBTNDj6ohyQ752sAJJI44EPbmSRA/vTUgBuSaMLxkA0Ctz6hFJE0Ds73hLq4NMg9T9dmLujS9lhiRGufRwGGA5wGlCd5HDGQvSTXybZJnTJFTEG+0y2C9vZHRBIXpXdi4Pp42TIYFc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711503378; c=relaxed/simple; bh=ECemb7/KX8BGFyghPRdr8JHojkYBtQzWD/1aRhBEX7Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RwD3Xrcuevf3Uxm4MBRZH1XcNHRMEjby5ZKu+AaAlwVCubdOccMxkHZz0yqcCbJJAsqA9zC/I/VVd0ITZ3tDUb+KUroV/CA/k7645xJyB15eNqGgn1/yrp+9CchXsfJkS8sf5xGKFnyc3bsACcQQK4d5HT7cSWIH40Q3qmyKrKk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Eu3X/HBi; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1711503375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=iYPTOunHLd/Diy0hNlVVbA0CQwtG77CQYjtLHeiLuNo=; b=Eu3X/HBiPgUwywAvsA2JT5akEyLVjmMinuHQeMfqw4UKePoNiDpOplFI2R5Q7yK/82YLnS 958yqbhM1OwKArKeQWrXaOPImlpGrIM1p23AIi+cMv8Su0xlNlZU78+gl7QPOjS+UJ0eme b9ZG7mzxFTIUSwkDYaYhs1So53wJj+0= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-250-LkaNSJ3YNy2Cx1WJHUkc9w-1; Tue, 26 Mar 2024 21:36:14 -0400 X-MC-Unique: LkaNSJ3YNy2Cx1WJHUkc9w-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-696914b6d2dso25566676d6.2 for ; Tue, 26 Mar 2024 18:36:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711503374; x=1712108174; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iYPTOunHLd/Diy0hNlVVbA0CQwtG77CQYjtLHeiLuNo=; b=L+7LzkJVbOhkDUDo9lV01eymSW11RD5uMRjSq37nUEvcHiopwZi+Yv3UPjRoHY2Tv3 pulslS0juhNlMv6qeFTJxjN5aY3Gz/LBXcvQtwzfuWUZhWvboPLRl9W7WlB3LtOtmSXH ySbfjAA2ClmvB8Tk3JyR7gcHBpE/MxyrWikz+Fub987eU5ZvjZb0Vq2ChJKArQ2LTL0v 0LRzWe/GCPq897OPFoeGfqqVsfRUtGpmXaYckujFQD/cmiQiNM0FOJcSXHx+bpA7SLcU boNsIYqj6h1rXo/KoWG2ZVlFa6AWW0jHCVfkuBOCVQaoKeO4a64xQ7/B1rFmUirGGA89 xLHw== X-Gm-Message-State: AOJu0YyZID7disobWwW67E56GeyNCkb8XMdqSiidxdzE43mfg6MapSpw wqnrinENkSo7nvg5YzykgClYfmjEZmlfmHsKLbX9hOaplNLCsoOiBKp6kC71Xc09cPvpu0yAZsD xOyfkYQ6lNuqcGfMdXo1F3UfANsFa+kSr0u0pzb0ekYza/jZeekXwkfUjiacIVA== X-Received: by 2002:a05:6214:e6c:b0:690:b3a3:2261 with SMTP id jz12-20020a0562140e6c00b00690b3a32261mr2857118qvb.53.1711503374032; Tue, 26 Mar 2024 18:36:14 -0700 (PDT) X-Received: by 2002:a05:6214:e6c:b0:690:b3a3:2261 with SMTP id jz12-20020a0562140e6c00b00690b3a32261mr2857103qvb.53.1711503373718; Tue, 26 Mar 2024 18:36:13 -0700 (PDT) Received: from LeoBras.redhat.com ([2804:1b3:a801:90ea:8d3f:e47:b819:941d]) by smtp.gmail.com with ESMTPSA id x11-20020ad4458b000000b00696a47179a1sm819669qvu.14.2024.03.26.18.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 18:36:12 -0700 (PDT) From: Leonardo Bras To: Helen Koike , Leonardo Bras Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v1 1/1] gitlab-ci: Let project define runner using environment variables Date: Tue, 26 Mar 2024 22:30:54 -0300 Message-ID: <20240327013055.139494-2-leobras@redhat.com> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Currently it's not possible to select which runner will handle a pipeline without changing the codebase. Add CI_TAGS environment variable, which can be used to select a runner either from a commit message, or directly from Gitlab interface. Also add Documentation for this variable. Signed-off-by: Leonardo Bras --- This patch goes on top on a previous patchset sent by Helen: https://lore.kernel.org/all/20240228225527.1052240-1-helen.koike@collabora.com/ With this patch I could run CI with gitlab.com runners, by setting CI_TAGS=saas-linux-medium-amd64 The result of this pipeline can be seen in: https://gitlab.com/linux-kernel/linux/-/pipelines/1228999646 Documentation/ci/gitlab-ci/gitlab-ci.rst | 5 +++++ ci/gitlab-ci/yml/gitlab-ci.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Documentation/ci/gitlab-ci/gitlab-ci.rst b/Documentation/ci/gitlab-ci/gitlab-ci.rst index 4f7ef03cca95..18360da835bd 100644 --- a/Documentation/ci/gitlab-ci/gitlab-ci.rst +++ b/Documentation/ci/gitlab-ci/gitlab-ci.rst @@ -304,20 +304,25 @@ Description of Each Variable **KCI_CHECKPATCH_OPTIONS** Used in `checkpatch.pl "$KCI_CHECKPATCH_OPTIONS"` (see checkpatch documentation). It is commonly used with the --ignore flag to suppress specific warnings generated by checkpatch.pl. It can also be defined in the commit message, since it is evaluated in run time. **KCI_PATCH_SERIES_SIZE** Used to define the size of the patch series, see `job: checkpatch` section above. It is evaluated in run time, and can be set in the commit message. +**CI_TAGS** + Used to help choose which runner will deal with the current pipeline. + If using Gitlab.com runners, set saas-linux-medium-amd64 or a better runner + so there is enough resources to build & commit the base image. + .. _triggering-pipelines-from-command-line: Triggering Pipelines from Command Line -------------------------------------- Pipelines can be triggered from the command line with custom variables using the `GitLab CLI tool `_. Example: diff --git a/ci/gitlab-ci/yml/gitlab-ci.yml b/ci/gitlab-ci/yml/gitlab-ci.yml index 57b9c0290471..359b7715e3ab 100644 --- a/ci/gitlab-ci/yml/gitlab-ci.yml +++ b/ci/gitlab-ci/yml/gitlab-ci.yml @@ -33,20 +33,22 @@ workflow: - if: $FORCE_CI == 'true' variables: FDO_UPSTREAM_REPO: helen.fornazier/linux # The repo where to look for cached images # ccache builds in gitlab-runner to speed up builds SMATCH_DB_DIR: /smatch/smatch_data # exit code of bash script on `script` will be the exit code of the job FF_USE_NEW_BASH_EVAL_STRATEGY: "true" default: + tags: + - $CI_TAGS artifacts: paths: - artifacts/ when: always include: - remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/16bc29078de5e0a067ff84a1a199a3760d3b3811/templates/ci-fairy.yml' - remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/16bc29078de5e0a067ff84a1a199a3760d3b3811/templates/debian.yml' - ci/gitlab-ci/yml/kernel-combinations.yml -- 2.44.0