linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Helen Koike <helen.koike@collabora.com>
To: Leonardo Bras <leobras@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v1 1/1] gitlab-ci: Let project define runner using environment variables
Date: Thu, 28 Mar 2024 10:17:00 -0300	[thread overview]
Message-ID: <c0cc12e6-4f71-449c-b614-a8fbfb4aaa80@collabora.com> (raw)
In-Reply-To: <20240327013055.139494-2-leobras@redhat.com>

Hi Leonardo,

Thanks for the patch.

On 26/03/2024 22:30, Leonardo Bras wrote:
> 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 <leobras@redhat.com>
> ---
> 
> 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**

I would just s/CI/KCI , I'm using KCI_prefix for those that are defined 
by us, since gitlab already uses CI_ prefix.


We will also need a way to specify tags per job at some point 
KCI_TAGS_$JOB_NAME or something, but this can be added later.

Acked-by: Helen Koike <helen.koike@collabora.com>

I'll add on top of my tree for now, so we can prepare v2 with this change.

Thanks
Helen

> +    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 <https://docs.gitlab.com/ee/editor_extensions/gitlab_cli>`_.
>   
>   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

  reply	other threads:[~2024-03-28 13:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27  1:30 [PATCH v1 1/1] gitlab-ci: Let project define runner using environment variables Leonardo Bras
2024-03-28 13:17 ` Helen Koike [this message]
2024-03-28 14:52   ` Leonardo Bras

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=c0cc12e6-4f71-449c-b614-a8fbfb4aaa80@collabora.com \
    --to=helen.koike@collabora.com \
    --cc=leobras@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).