qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Willian Rampazzo" <wrampazz@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: gitlab-ci: Only build /staging branch?
Date: Thu, 25 Mar 2021 11:14:03 +0000	[thread overview]
Message-ID: <YFxwe7nMeMKyIep1@redhat.com> (raw)
In-Reply-To: <a70af3b7-4500-edd3-9a85-242783b24b2a@redhat.com>

On Thu, Mar 25, 2021 at 12:05:32PM +0100, Paolo Bonzini wrote:
> On 25/03/21 11:34, Peter Maydell wrote:
> > It needs to be faster. Mostly I do check the gitlab CI pipeline
> > status, but in the run-up to getting rc0 out I stopped waiting
> > for the gitlab CI job to finish, because I was continually finding
> > that I kicked off a run, my local build-tests would complete within
> > an hour or so, and the gitlab CI jobs were still pending, barely
> > started, etc. Turnaround on testing a merge must be 90 minutes or
> > less, especially during release periods, because there are always
> > a huge number of merges that arrive for me to test in the last
> > couple of days before freeze.
> 
> Perhaps we could script it so that if the pipeline passes the merge to
> master is done automatically.

No need to script it, that functionality already exists in GitLab.

Push to the staging branch, and open a merge request for applying
staging -> master, and enable "merge when pipeline succeeds".

You can actually do this all in one command

https://docs.gitlab.com/ee/user/project/push_options.html

  git push \
     -o merge_request.create \
     -o merge_request.target=master \
     -o merge_request.merge_when_pipeline_succeeds \
     origin staging


The gitlab-ci.yml file could then be configured so that pipeline
jobs are associated with a merge request, rather than push event.
This will avoid the pipeline being re-run on master after the
merge.

If you enable "merge trains" option in the repo, then you can
even push to multiple branches concurrently, and gitlab will
serialize the CI pipelines from each merge request in turn,
(assuming no conflicts between then).

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  parent reply	other threads:[~2021-03-25 11:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 18:01 gitlab-ci: Only build /staging branch? Philippe Mathieu-Daudé
2021-03-24 18:33 ` Philippe Mathieu-Daudé
2021-03-24 21:58   ` Philippe Mathieu-Daudé
2021-03-25  5:43     ` Thomas Huth
2021-03-25  9:29       ` Philippe Mathieu-Daudé
2021-03-25  9:50         ` Philippe Mathieu-Daudé
2021-03-25 10:34         ` Peter Maydell
2021-03-25 11:05           ` Paolo Bonzini
2021-03-25 11:06             ` Peter Maydell
2021-03-25 11:14             ` Daniel P. Berrangé [this message]
2021-03-24 23:11 ` Cleber Rosa

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=YFxwe7nMeMKyIep1@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wrampazz@redhat.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;
as well as URLs for NNTP newsgroup(s).