* [PATCH] gitlab-ci: Allow adding manual jobs on cirrus-ci
@ 2022-03-14 14:31 Philippe Mathieu-Daudé
2022-05-17 10:10 ` Thomas Huth
0 siblings, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-14 14:31 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Daniel P . Berrangé, Beraldo Leal,
Philippe Mathieu-Daudé, Wainer dos Santos Moschetta,
Alex Bennée
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
By default, all Cirrus-CI jobs are added as 'on_success' (the
default value). Add a ${MANUAL_JOB} variable (default to 0)
to be able to add manual jobs.
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
.gitlab-ci.d/cirrus.yml | 2 ++
.gitlab-ci.d/cirrus/build.yml | 1 +
2 files changed, 3 insertions(+)
diff --git a/.gitlab-ci.d/cirrus.yml b/.gitlab-ci.d/cirrus.yml
index b96b22e269..9e640019dd 100644
--- a/.gitlab-ci.d/cirrus.yml
+++ b/.gitlab-ci.d/cirrus.yml
@@ -44,6 +44,8 @@
# Allow on 'staging' branch and 'stable-X.Y-staging' branches only
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH !~ /staging/'
when: never
+ - if: '$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN && $MANUAL_JOB == "1"'
+ when: manual
- if: "$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN"
x64-freebsd-12-build:
diff --git a/.gitlab-ci.d/cirrus/build.yml b/.gitlab-ci.d/cirrus/build.yml
index c555f5d36e..c58dc86855 100644
--- a/.gitlab-ci.d/cirrus/build.yml
+++ b/.gitlab-ci.d/cirrus/build.yml
@@ -14,6 +14,7 @@ env:
MAKE: "@MAKE@"
CONFIGURE_ARGS: "@CONFIGURE_ARGS@"
TEST_TARGETS: "@TEST_TARGETS@"
+ MANUAL_JOB: 0
build_task:
install_script:
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] gitlab-ci: Allow adding manual jobs on cirrus-ci 2022-03-14 14:31 [PATCH] gitlab-ci: Allow adding manual jobs on cirrus-ci Philippe Mathieu-Daudé @ 2022-05-17 10:10 ` Thomas Huth 2022-05-17 10:30 ` Daniel P. Berrangé 0 siblings, 1 reply; 4+ messages in thread From: Thomas Huth @ 2022-05-17 10:10 UTC (permalink / raw) To: Philippe Mathieu-Daudé, qemu-devel, Daniel P . Berrangé Cc: Philippe Mathieu-Daudé, Wainer dos Santos Moschetta, Beraldo Leal, Alex Bennée On 14/03/2022 15.31, Philippe Mathieu-Daudé wrote: > From: Philippe Mathieu-Daudé <f4bug@amsat.org> > > By default, all Cirrus-CI jobs are added as 'on_success' (the > default value). Add a ${MANUAL_JOB} variable (default to 0) > to be able to add manual jobs. > > Suggested-by: Daniel P. Berrangé <berrange@redhat.com> > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > .gitlab-ci.d/cirrus.yml | 2 ++ > .gitlab-ci.d/cirrus/build.yml | 1 + > 2 files changed, 3 insertions(+) > > diff --git a/.gitlab-ci.d/cirrus.yml b/.gitlab-ci.d/cirrus.yml > index b96b22e269..9e640019dd 100644 > --- a/.gitlab-ci.d/cirrus.yml > +++ b/.gitlab-ci.d/cirrus.yml > @@ -44,6 +44,8 @@ > # Allow on 'staging' branch and 'stable-X.Y-staging' branches only > - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH !~ /staging/' > when: never > + - if: '$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN && $MANUAL_JOB == "1"' > + when: manual > - if: "$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN" > > x64-freebsd-12-build: > diff --git a/.gitlab-ci.d/cirrus/build.yml b/.gitlab-ci.d/cirrus/build.yml > index c555f5d36e..c58dc86855 100644 > --- a/.gitlab-ci.d/cirrus/build.yml > +++ b/.gitlab-ci.d/cirrus/build.yml > @@ -14,6 +14,7 @@ env: > MAKE: "@MAKE@" > CONFIGURE_ARGS: "@CONFIGURE_ARGS@" > TEST_TARGETS: "@TEST_TARGETS@" > + MANUAL_JOB: 0 > > build_task: > install_script: Hi Philippe! Sorry for the late reply ... I think this might collide with Daniel's patch that turns most jobs to manual mode (https://lore.kernel.org/all/20210812180403.4129067-3-berrange@redhat.com/) which he is hopefully going to respin soon ... but anyway, if you add a variable like this, there should be an update to docs/devel/ci-jobs.rst.inc to describe the new variable, otherwise you might be the only one who's using it. Thomas ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gitlab-ci: Allow adding manual jobs on cirrus-ci 2022-05-17 10:10 ` Thomas Huth @ 2022-05-17 10:30 ` Daniel P. Berrangé 2022-05-17 10:45 ` Thomas Huth 0 siblings, 1 reply; 4+ messages in thread From: Daniel P. Berrangé @ 2022-05-17 10:30 UTC (permalink / raw) To: Thomas Huth Cc: Philippe Mathieu-Daudé, qemu-devel, Philippe Mathieu-Daudé, Wainer dos Santos Moschetta, Beraldo Leal, Alex Bennée On Tue, May 17, 2022 at 12:10:30PM +0200, Thomas Huth wrote: > On 14/03/2022 15.31, Philippe Mathieu-Daudé wrote: > > From: Philippe Mathieu-Daudé <f4bug@amsat.org> > > > > By default, all Cirrus-CI jobs are added as 'on_success' (the > > default value). Add a ${MANUAL_JOB} variable (default to 0) > > to be able to add manual jobs. > > > > Suggested-by: Daniel P. Berrangé <berrange@redhat.com> > > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > > --- > > .gitlab-ci.d/cirrus.yml | 2 ++ > > .gitlab-ci.d/cirrus/build.yml | 1 + > > 2 files changed, 3 insertions(+) > > > > diff --git a/.gitlab-ci.d/cirrus.yml b/.gitlab-ci.d/cirrus.yml > > index b96b22e269..9e640019dd 100644 > > --- a/.gitlab-ci.d/cirrus.yml > > +++ b/.gitlab-ci.d/cirrus.yml > > @@ -44,6 +44,8 @@ > > # Allow on 'staging' branch and 'stable-X.Y-staging' branches only > > - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH !~ /staging/' > > when: never > > + - if: '$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN && $MANUAL_JOB == "1"' > > + when: manual > > - if: "$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN" > > x64-freebsd-12-build: > > diff --git a/.gitlab-ci.d/cirrus/build.yml b/.gitlab-ci.d/cirrus/build.yml > > index c555f5d36e..c58dc86855 100644 > > --- a/.gitlab-ci.d/cirrus/build.yml > > +++ b/.gitlab-ci.d/cirrus/build.yml > > @@ -14,6 +14,7 @@ env: > > MAKE: "@MAKE@" > > CONFIGURE_ARGS: "@CONFIGURE_ARGS@" > > TEST_TARGETS: "@TEST_TARGETS@" > > + MANUAL_JOB: 0 This addition doesn't make sense. build.yml is config that is run by Cirrus CI. The MANUAL_JOB env is interpreted by GitLab CI, so would only ever be set by jobs in .gitlab-ci.d/cirrus.yml > > build_task: > > install_script: > > Hi Philippe! > > Sorry for the late reply ... I think this might collide with Daniel's patch > that turns most jobs to manual mode > (https://lore.kernel.org/all/20210812180403.4129067-3-berrange@redhat.com/) > which he is hopefully going to respin soon ... but anyway, if you add a > variable like this, there should be an update to docs/devel/ci-jobs.rst.inc > to describe the new variable, otherwise you might be the only one who's > using it. IIUC, this MANUAL_JOB variable isn't for end developer usage, rather it is for usage when adding jobs to .gitlab-ci.d/cirrus.yml, so I don't think it needs documenting there. THis simply lets us add a bunch more jobs to cirrus.yml without causing timeout problems by having them all run at once, providing we put MANUAL_JOB: 1 in the config for the new job. No need to delay this for sake of my series. I'll adapt to whatever exists at the time I'm rebasing. With 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 :| ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gitlab-ci: Allow adding manual jobs on cirrus-ci 2022-05-17 10:30 ` Daniel P. Berrangé @ 2022-05-17 10:45 ` Thomas Huth 0 siblings, 0 replies; 4+ messages in thread From: Thomas Huth @ 2022-05-17 10:45 UTC (permalink / raw) To: Daniel P. Berrangé Cc: Philippe Mathieu-Daudé, qemu-devel, Philippe Mathieu-Daudé, Wainer dos Santos Moschetta, Beraldo Leal, Alex Bennée On 17/05/2022 12.30, Daniel P. Berrangé wrote: > On Tue, May 17, 2022 at 12:10:30PM +0200, Thomas Huth wrote: >> On 14/03/2022 15.31, Philippe Mathieu-Daudé wrote: >>> From: Philippe Mathieu-Daudé <f4bug@amsat.org> >>> >>> By default, all Cirrus-CI jobs are added as 'on_success' (the >>> default value). Add a ${MANUAL_JOB} variable (default to 0) >>> to be able to add manual jobs. >>> >>> Suggested-by: Daniel P. Berrangé <berrange@redhat.com> >>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> >>> --- >>> .gitlab-ci.d/cirrus.yml | 2 ++ >>> .gitlab-ci.d/cirrus/build.yml | 1 + >>> 2 files changed, 3 insertions(+) >>> >>> diff --git a/.gitlab-ci.d/cirrus.yml b/.gitlab-ci.d/cirrus.yml >>> index b96b22e269..9e640019dd 100644 >>> --- a/.gitlab-ci.d/cirrus.yml >>> +++ b/.gitlab-ci.d/cirrus.yml >>> @@ -44,6 +44,8 @@ >>> # Allow on 'staging' branch and 'stable-X.Y-staging' branches only >>> - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH !~ /staging/' >>> when: never >>> + - if: '$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN && $MANUAL_JOB == "1"' >>> + when: manual > > > >>> - if: "$CIRRUS_GITHUB_REPO && $CIRRUS_API_TOKEN" >>> x64-freebsd-12-build: >>> diff --git a/.gitlab-ci.d/cirrus/build.yml b/.gitlab-ci.d/cirrus/build.yml >>> index c555f5d36e..c58dc86855 100644 >>> --- a/.gitlab-ci.d/cirrus/build.yml >>> +++ b/.gitlab-ci.d/cirrus/build.yml >>> @@ -14,6 +14,7 @@ env: >>> MAKE: "@MAKE@" >>> CONFIGURE_ARGS: "@CONFIGURE_ARGS@" >>> TEST_TARGETS: "@TEST_TARGETS@" >>> + MANUAL_JOB: 0 > > This addition doesn't make sense. build.yml is config that is run > by Cirrus CI. > > The MANUAL_JOB env is interpreted by GitLab CI, so would only ever > be set by jobs in .gitlab-ci.d/cirrus.yml > >>> build_task: >>> install_script: >> >> Hi Philippe! >> >> Sorry for the late reply ... I think this might collide with Daniel's patch >> that turns most jobs to manual mode >> (https://lore.kernel.org/all/20210812180403.4129067-3-berrange@redhat.com/) >> which he is hopefully going to respin soon ... but anyway, if you add a >> variable like this, there should be an update to docs/devel/ci-jobs.rst.inc >> to describe the new variable, otherwise you might be the only one who's >> using it. > > IIUC, this MANUAL_JOB variable isn't for end developer usage, rather it is > for usage when adding jobs to .gitlab-ci.d/cirrus.yml, so I don't think it > needs documenting there. THis simply lets us add a bunch more jobs to > cirrus.yml without causing timeout problems by having them all run at > once, providing we put MANUAL_JOB: 1 in the config for the new job. Ok, but then this patch is incomplete. This should either be in a series that introduces such new jobs, or/and rework the NetBSD and OpenBSD jobs to use this variable, too. Thomas ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-17 10:49 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-03-14 14:31 [PATCH] gitlab-ci: Allow adding manual jobs on cirrus-ci Philippe Mathieu-Daudé 2022-05-17 10:10 ` Thomas Huth 2022-05-17 10:30 ` Daniel P. Berrangé 2022-05-17 10:45 ` Thomas Huth
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.