All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Anthony PERARD" <anthony.perard@vates.tech>
To: "Stefano Stabellini" <sstabellini@kernel.org>
Cc: xen-devel@lists.xenproject.org,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Doug Goldstein" <cardoe@cardoe.com>
Subject: Re: [XEN PATCH 3/3] CI: New stage "containers" to rebuild some containers
Date: Mon, 18 Nov 2024 14:03:42 +0000	[thread overview]
Message-ID: <ZztJPKoLvaTZguze@l14> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2411151629450.1160299@ubuntu-linux-20-04-desktop>

On Fri, Nov 15, 2024 at 04:34:21PM -0800, Stefano Stabellini wrote:
> On Fri, 15 Nov 2024, Anthony PERARD wrote:
> > Rebuild rolling release containers when XEN_CI_REBUILD_CONTAINERS is
> > set. This is to be use with a scheduled pipeline.
> > 
> > When $XEN_CI_REBUILD_CONTAINERS is set, only build jobs related to the
> > containers been rebuild will be executed.
> > 
> > Build jobs that are using one of the containers been rebuild should
> > wait for the container to be rebuild. If it's a normal pipeline, those
> > dependency are simply ignored.
> 
> This is a fantastic contribution, thanks Anthony!
> 
> I think we can simplify this patch by removing all stages except for
> "containers" on the scheduled pipeline with XEN_CI_REBUILD_CONTAINERS
> set to true.
> 
> I think it is a good idea to have a special schedule pipeline for this,
> and we should exploit the fact that it is special and only use it to
> rebuild the containers. If we want to, we can have a second scheduled
> pipeline to do a full normal run afterwards.
> 
> This way, there is no need to carry the changes to build.yaml or
> test.yaml that are a bit hard to read/understand for someone unfamiliar
> with gitlab. When XEN_CI_REBUILD_CONTAINERS == true we only do the
> containers stage.

So, you mean having this following change instead of make changes to
build.yaml and test.yaml, right?

    diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
    --- a/.gitlab-ci.yml
    +++ b/.gitlab-ci.yml
    @@ -14,7 +14,15 @@ stages:
       - test
     
     include:
    -  - 'automation/gitlab-ci/containers.yaml'
    -  - 'automation/gitlab-ci/analyze.yaml'
    -  - 'automation/gitlab-ci/build.yaml'
    -  - 'automation/gitlab-ci/test.yaml'
    +  - local: 'automation/gitlab-ci/containers.yaml'
    +    rules:
    +      - if: $XEN_CI_REBUILD_CONTAINERS
    +  - local: 'automation/gitlab-ci/analyze.yaml'
    +    rules:
    +      - if: $XEN_CI_REBUILD_CONTAINERS == null
    +  - local: 'automation/gitlab-ci/build.yaml'
    +    rules:
    +      - if: $XEN_CI_REBUILD_CONTAINERS == null
    +  - local: 'automation/gitlab-ci/test.yaml'
    +    rules:
    +      - if: $XEN_CI_REBUILD_CONTAINERS == null


Or I guess we can also compare to the string "true" and write the
expression as
    if: $XEN_CI_REBUILD_CONTAINERS == "true"
and
    if: $XEN_CI_REBUILD_CONTAINERS != "true"

Cheers,

-- 

Anthony Perard | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech


  reply	other threads:[~2024-11-18 14:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-15 17:07 [XEN PATCH 0/3] CI: Allow automatic rebuild of rolling release containers Anthony PERARD
2024-11-15 17:07 ` [XEN PATCH 3/3] CI: New stage "containers" to rebuild some containers Anthony PERARD
2024-11-16  0:34   ` Stefano Stabellini
2024-11-18 14:03     ` Anthony PERARD [this message]
2024-11-19  0:04       ` Stefano Stabellini
2024-11-15 17:07 ` [XEN PATCH 2/3] CI: Define XEN_REGISTRY variable Anthony PERARD
2024-11-16  0:34   ` Stefano Stabellini
2024-11-15 17:07 ` [XEN PATCH 1/3] CI: Remove deprecated "only:variables" in favor of "rules:if" Anthony PERARD
2024-11-16  0:34   ` Stefano Stabellini
2024-11-15 17:13 ` [XEN PATCH 0/3] CI: Allow automatic rebuild of rolling release containers Andrew Cooper
2024-11-18 12:48   ` Anthony PERARD

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=ZztJPKoLvaTZguze@l14 \
    --to=anthony.perard@vates.tech \
    --cc=andrew.cooper3@citrix.com \
    --cc=cardoe@cardoe.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.