[libvirt PATCH 1/2] gitlab-ci.yaml: Introduce a variable to disable long broken jobs
Daniel P. Berrangé
berrange at redhat.com
Mon Jan 11 15:12:41 UTC 2021
On Mon, Jan 11, 2021 at 04:05:48PM +0100, Erik Skultety wrote:
> On Mon, Jan 11, 2021 at 03:03:17PM +0000, Daniel P. Berrangé wrote:
> > On Mon, Jan 11, 2021 at 03:56:03PM +0100, Erik Skultety wrote:
> > > On Mon, Jan 11, 2021 at 01:53:49PM +0000, Daniel P. Berrangé wrote:
> > > > On Mon, Jan 11, 2021 at 02:42:54PM +0100, Erik Skultety wrote:
> > > > > Unfortunately GitLab doesn't have a different mechanism on how to mark
> > > > > jobs as skipped or disabled apart from the 'only'/'except' pragmas.
> > > > > Use the 'except' pragma for the job templates to skip jobs which define
> > > > > the DISABLE_JOB variable.
> > > >
> > > > What's wrong with using
> > > >
> > > > when: never (or manual to let devs force it from the UI)
> > > >
> > >
> > > 'when: never' can only be used in conjunction with the 'rules' keyword ,
> > > which in turn is mutually exclusive with 'only/except'  which we currently
> > > utilize.
> > Gitlab recommends use of "rules" over "only/except", so we should
> > probably change that.
> I noticed, but it either wasn't clear or I simply missed in the docs how you
> can restrict job execution by a particular branch with rules.
Do a match against the env variable
- if: '$CI_COMMIT_REF_NAME == "master"'
|: 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 :|
More information about the libvir-list