public inbox for kernelci@lists.linux.dev
 help / color / mirror / Atom feed
From: Leonardo Bras <leobras@redhat.com>
To: Helen Koike <helen.koike@collabora.com>,
	Vignesh Raman <vignesh.raman@collabora.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Leonardo Bras <leobras@redhat.com>,
	Shreeya Patel <shreeya.patel@collabora.com>
Cc: kernelci@lists.linux.dev, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/1] gitlab-ci: Let project define runner using environment variables
Date: Mon, 27 Jan 2025 15:58:49 -0300	[thread overview]
Message-ID: <20250127185849.34131-1-leobras@redhat.com> (raw)

Currently it's not possible to select which runner will handle a pipeline
without changing the codebase.

Add KCI_CI_TAGS environment variable, which can be used to select a runner
either from a commit message, or directly from Gitlab interface.
If not set in any way, the project will pick the default runner.

Also add Documentation for this variable.

Signed-off-by: Leonardo Bras <leobras@redhat.com>
---
 Documentation/ci/gitlab-ci/gitlab-ci.rst | 5 +++++
 tools/ci/gitlab-ci/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 940a800069238..ce89e4c093863 100644
--- a/Documentation/ci/gitlab-ci/gitlab-ci.rst
+++ b/Documentation/ci/gitlab-ci/gitlab-ci.rst
@@ -371,20 +371,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.
 
+**KCI_CI_TAGS**
+    Used to help choose which runner will deal with the current pipeline.
+    Make sure to use a runner with at least 16GB of RAM, as this is required
+    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 <https://docs.gitlab.com/ee/editor_extensions/gitlab_cli>`_.
 
 Example:
 
diff --git a/tools/ci/gitlab-ci/gitlab-ci.yml b/tools/ci/gitlab-ci/gitlab-ci.yml
index d2679d9929de1..f49105ee61be6 100644
--- a/tools/ci/gitlab-ci/gitlab-ci.yml
+++ b/tools/ci/gitlab-ci/gitlab-ci.yml
@@ -34,20 +34,22 @@ workflow:
 
 variables:
   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"
   KCI_SCENARIO:
     description: Set to any non-empty value to disable scenarios
     value: ""
 
 default:
+  tags:
+    - $KCI_CI_TAGS
   artifacts:
     paths:
       - artifacts/
     when: always
 
 include:
   - remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/16bc29078de5e0a067ff84a1a199a3760d3b3811/templates/debian.yml'
 
   - tools/ci/gitlab-ci/container.yml
   - tools/ci/gitlab-ci/cache.yml
-- 
2.48.1


                 reply	other threads:[~2025-01-27 18:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250127185849.34131-1-leobras@redhat.com \
    --to=leobras@redhat.com \
    --cc=corbet@lwn.net \
    --cc=helen.koike@collabora.com \
    --cc=kernelci@lists.linux.dev \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shreeya.patel@collabora.com \
    --cc=vignesh.raman@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox