[PATCH 0/2] gitlab: prepare for limited CI minutes by not running by default

Daniel P. Berrangé posted 2 patches 2 years, 8 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210812180403.4129067-1-berrange@redhat.com
.gitlab-ci.d/buildtest-template.yml  |  17 +--
.gitlab-ci.d/buildtest.yml           |  43 +++----
.gitlab-ci.d/cirrus.yml              |   6 +-
.gitlab-ci.d/container-core.yml      |   4 +
.gitlab-ci.d/container-cross.yml     |   9 +-
.gitlab-ci.d/container-template.yml  |   1 +
.gitlab-ci.d/containers.yml          |   4 +
.gitlab-ci.d/crossbuild-template.yml |   3 +
.gitlab-ci.d/crossbuilds.yml         |   3 +
.gitlab-ci.d/qemu-project.yml        |   1 +
.gitlab-ci.d/rules.yml               | 116 +++++++++++++++++++
.gitlab-ci.d/static_checks.yml       |  18 +--
.gitlab-ci.yml                       |   4 -
docs/devel/ci-jobs.rst               | 161 +++++++++++++++++++++++++++
docs/devel/ci-runners.rst            | 117 +++++++++++++++++++
docs/devel/ci.rst                    | 159 +-------------------------
16 files changed, 459 insertions(+), 207 deletions(-)
create mode 100644 .gitlab-ci.d/rules.yml
create mode 100644 docs/devel/ci-jobs.rst
create mode 100644 docs/devel/ci-runners.rst
[PATCH 0/2] gitlab: prepare for limited CI minutes by not running by default
Posted by Daniel P. Berrangé 2 years, 8 months ago
A while ago GitLab announced it would be ending the free unlimited CI
minutes for public projects. It hasn't happened yet, but it is certainly
still on the radar. It is possible for OSS projects to get a greater
allowance, but it is still unclear how this will work for contributors'
forks. Even with the greater allowance, we'll burn through it in just
a few pipeline runs. People creating brand new gitlab accounts are
already getting hurt by the new limits IIUC.

This series isn't a full solution, but it gets us started in a more
sustainable direction. See the second patch commit message and the
docs that it adds for full details.

At a high level though, with this series applied, we no longer run
any CI jobs by default, except for the 'staging' branch in the
'qemu-project' namespace.

Users can manually start any individual job from the web UI still
though. Further, they can opt-in to various sets of jobs

 - 100% manual jobs (the new default):

    https://gitlab.com/berrange/qemu/-/pipelines/352393697

 - A minimal set of jobs

    https://gitlab.com/berrange/qemu/-/pipelines/352397093

 - A full set of jobs (the old default)

    https://gitlab.com/berrange/qemu/-/pipelines/352123582

 - A gating set of jobs (identical to what's run on staging)

    https://gitlab.com/berrange/qemu/-/pipelines/352195185

With this starting point, the common "rules" definition across
all jobs, makes it easy for us to add more refinements. We can
defining further sets of interesting jobs.

eg could define a set of cross-compilation, or a set for
non-Linux, or a set of Windows, or sets for particular host
architectures, etc.

Daniel P. Berrangé (2):
  docs: split the CI docs into two files
  gitlab: don't run CI jobs by default on push to user forks

 .gitlab-ci.d/buildtest-template.yml  |  17 +--
 .gitlab-ci.d/buildtest.yml           |  43 +++----
 .gitlab-ci.d/cirrus.yml              |   6 +-
 .gitlab-ci.d/container-core.yml      |   4 +
 .gitlab-ci.d/container-cross.yml     |   9 +-
 .gitlab-ci.d/container-template.yml  |   1 +
 .gitlab-ci.d/containers.yml          |   4 +
 .gitlab-ci.d/crossbuild-template.yml |   3 +
 .gitlab-ci.d/crossbuilds.yml         |   3 +
 .gitlab-ci.d/qemu-project.yml        |   1 +
 .gitlab-ci.d/rules.yml               | 116 +++++++++++++++++++
 .gitlab-ci.d/static_checks.yml       |  18 +--
 .gitlab-ci.yml                       |   4 -
 docs/devel/ci-jobs.rst               | 161 +++++++++++++++++++++++++++
 docs/devel/ci-runners.rst            | 117 +++++++++++++++++++
 docs/devel/ci.rst                    | 159 +-------------------------
 16 files changed, 459 insertions(+), 207 deletions(-)
 create mode 100644 .gitlab-ci.d/rules.yml
 create mode 100644 docs/devel/ci-jobs.rst
 create mode 100644 docs/devel/ci-runners.rst

-- 
2.31.1