gitlab-ci: add multiple stages/tiers for tests

We have many test configurations (i.e. distros like fedora:37,
debian:9).  Almost all of them run manually triggered, because running
them every time would be wasteful.

Still, even as we trigger those tests only seldom, whenever we trigger
them all together, they consume still too many resources of the
freedesktop.org gitlab infrastructure.

One possibility would be to just drop old distros (e.g. fedora:30).
Which tests are setup in gitlab-ci is constantly refined and adjusted.
So dropping some distros is not necessarily wrong and bound to happen
eventually.

However, I also don't find it great to just disable tests that are still
passing. If we want to avoid consuming too many resources, we can just
choose not to run those tests. We don't need to enforce that by deleting
tests. Once deleted, such a configuration cannot be tested anymore as it
would be too cumbersome to recreate the setup manually.

Instead, introduce stages/tiers to clearer mark configuration that we
should test even less frequently.

Note that it is still required from the developer to not trigger too
many tests at once, to not monopolize the CI resources. The stages
should make that clearer to see, but don't solve it. Deleting tests
might solve it, but only if we delete a significant number of those
tests, which seems not desirable.
This commit is contained in:
Thomas Haller 2023-04-11 12:23:30 +02:00
parent d39fb6f014
commit b06ddab9d4
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
3 changed files with 382 additions and 311 deletions

View file

@ -15,6 +15,8 @@
.templates_sha: &template_sha ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
include:
# Alpine container builder template
- project: 'freedesktop/ci-templates'
@ -39,7 +41,9 @@ include:
stages:
- prep
- test
- tier1
- tier2
- tier3
- deploy
- triage
- container_clean
@ -53,17 +57,17 @@ variables:
#
# This is done by running `ci-fairy generate-template` and possibly bumping
# ".default_tag".
FEDORA_TAG: '2023-01-18.0-82ad875db2dc'
UBUNTU_TAG: '2023-01-18.0-b674114b79c1'
DEBIAN_TAG: '2023-01-18.0-b674114b79c1'
CENTOS_TAG: '2023-01-18.0-82ad875db2dc'
ALPINE_TAG: '2023-01-18.0-14c807942fa4'
ALPINE_TAG: '2023-04-11.0-c319e2a8ce5b'
CENTOS_TAG: '2023-04-11.0-3322a2e54777'
DEBIAN_TAG: '2023-04-11.0-b529fd8eba83'
FEDORA_TAG: '2023-04-11.0-3322a2e54777'
UBUNTU_TAG: '2023-04-11.0-b529fd8eba83'
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh'
UBUNTU_EXEC: 'bash .gitlab-ci/debian-install.sh'
DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
.nm_artifacts:
variables:
@ -93,6 +97,36 @@ variables:
# Build a container for each distribution + version. The ci-templates
# will re-use the containers if the tag doesn't change.
fedora:37@container-prep:
extends:
- .fdo.container-build@fedora
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '37'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
fedora:36@container-prep:
extends:
- .fdo.container-build@fedora
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '36'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
fedora:38@container-prep:
extends:
- .fdo.container-build@fedora
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '38'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
fedora:30@container-prep:
extends:
- .fdo.container-build@fedora
@ -153,36 +187,6 @@ fedora:35@container-prep:
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
fedora:36@container-prep:
extends:
- .fdo.container-build@fedora
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '36'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
fedora:37@container-prep:
extends:
- .fdo.container-build@fedora
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '37'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
fedora:38@container-prep:
extends:
- .fdo.container-build@fedora
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '38'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
ubuntu:18.04@container-prep:
extends:
- .fdo.container-build@ubuntu
@ -233,16 +237,6 @@ ubuntu:rolling@container-prep:
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
FDO_DISTRIBUTION_EXEC: $UBUNTU_EXEC
debian:9@container-prep:
extends:
- .fdo.container-build@debian
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '9'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
FDO_DISTRIBUTION_EXEC: $DEBIAN_EXEC
debian:10@container-prep:
extends:
- .fdo.container-build@debian
@ -263,16 +257,6 @@ debian:11@container-prep:
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
FDO_DISTRIBUTION_EXEC: $DEBIAN_EXEC
debian:testing@container-prep:
extends:
- .fdo.container-build@debian
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: 'testing'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
FDO_DISTRIBUTION_EXEC: $DEBIAN_EXEC
debian:sid@container-prep:
extends:
- .fdo.container-build@debian
@ -283,6 +267,26 @@ debian:sid@container-prep:
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
FDO_DISTRIBUTION_EXEC: $DEBIAN_EXEC
debian:9@container-prep:
extends:
- .fdo.container-build@debian
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '9'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
FDO_DISTRIBUTION_EXEC: $DEBIAN_EXEC
debian:testing@container-prep:
extends:
- .fdo.container-build@debian
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: 'testing'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
FDO_DISTRIBUTION_EXEC: $DEBIAN_EXEC
centos:7.5.1804@container-prep:
extends:
- .fdo.container-build@centos
@ -293,6 +297,36 @@ centos:7.5.1804@container-prep:
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
centos:7.9.2009@container-prep:
extends:
- .fdo.container-build@centos
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '7.9.2009'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
centos:8.1.1911@container-prep:
extends:
- .fdo.container-build@centos
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '8.1.1911'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
centos:8.3.2011@container-prep:
extends:
- .fdo.container-build@centos
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '8.3.2011'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
centos:7.6.1810@container-prep:
extends:
- .fdo.container-build@centos
@ -323,26 +357,6 @@ centos:7.8.2003@container-prep:
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
centos:7.9.2009@container-prep:
extends:
- .fdo.container-build@centos
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '7.9.2009'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
centos:8.1.1911@container-prep:
extends:
- .fdo.container-build@centos
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '8.1.1911'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
centos:8.2.2004@container-prep:
extends:
- .fdo.container-build@centos
@ -353,16 +367,6 @@ centos:8.2.2004@container-prep:
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
centos:8.3.2011@container-prep:
extends:
- .fdo.container-build@centos
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '8.3.2011'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
alpine:latest@container-prep:
extends:
- .fdo.container-build@alpine
@ -407,6 +411,33 @@ alpine:latest@container-prep:
only:
- schedules
fedora:37@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '37'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
fedora:36@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '36'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
fedora:38@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '38'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
fedora:30@container-clean:
extends:
- .container-clean
@ -461,33 +492,6 @@ fedora:35@container-clean:
FDO_DISTRIBUTION_VERSION: '35'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
fedora:36@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '36'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
fedora:37@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '37'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
fedora:38@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '38'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
ubuntu:18.04@container-clean:
extends:
- .container-clean
@ -533,15 +537,6 @@ ubuntu:rolling@container-clean:
FDO_DISTRIBUTION_VERSION: 'rolling'
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
debian:9@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/debian/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '9'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
debian:10@container-clean:
extends:
- .container-clean
@ -560,15 +555,6 @@ debian:11@container-clean:
FDO_DISTRIBUTION_VERSION: '11'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
debian:testing@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/debian/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: 'testing'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
debian:sid@container-clean:
extends:
- .container-clean
@ -578,6 +564,24 @@ debian:sid@container-clean:
FDO_DISTRIBUTION_VERSION: 'sid'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
debian:9@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/debian/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '9'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
debian:testing@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/debian/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: 'testing'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
centos:7.5.1804@container-clean:
extends:
- .container-clean
@ -587,6 +591,33 @@ centos:7.5.1804@container-clean:
FDO_DISTRIBUTION_VERSION: '7.5.1804'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
centos:7.9.2009@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '7.9.2009'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
centos:8.1.1911@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '8.1.1911'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
centos:8.3.2011@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '8.3.2011'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
centos:7.6.1810@container-clean:
extends:
- .container-clean
@ -614,24 +645,6 @@ centos:7.8.2003@container-clean:
FDO_DISTRIBUTION_VERSION: '7.8.2003'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
centos:7.9.2009@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '7.9.2009'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
centos:8.1.1911@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '8.1.1911'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
centos:8.2.2004@container-clean:
extends:
- .container-clean
@ -641,15 +654,6 @@ centos:8.2.2004@container-clean:
FDO_DISTRIBUTION_VERSION: '8.2.2004'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
centos:8.3.2011@container-clean:
extends:
- .container-clean
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
FDO_DISTRIBUTION_VERSION: '8.3.2011'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
alpine:latest@container-clean:
extends:
- .container-clean
@ -667,7 +671,6 @@ alpine:latest@container-clean:
#################################################################
.build@template:
stage: test
script:
- env
- r=0
@ -684,11 +687,50 @@ alpine:latest@container-clean:
#################################################################
t_fedora:37:
extends:
- .build@template
- .fdo.distribution-image@fedora
- .nm_artifacts
stage: tier1
variables:
FDO_DISTRIBUTION_VERSION: '37'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "fedora:37@container-prep"
t_fedora:36:
extends:
- .build@template
- .fdo.distribution-image@fedora
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: '36'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "fedora:36@container-prep"
when: manual
t_fedora:38:
extends:
- .build@template
- .fdo.distribution-image@fedora
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: '38'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "fedora:38@container-prep"
when: manual
t_fedora:30:
extends:
- .build@template
- .fdo.distribution-image@fedora
- .nm_artifacts_debug
stage: tier3
variables:
FDO_DISTRIBUTION_VERSION: '30'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
@ -701,6 +743,7 @@ t_fedora:31:
- .build@template
- .fdo.distribution-image@fedora
- .nm_artifacts_debug
stage: tier3
variables:
FDO_DISTRIBUTION_VERSION: '31'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
@ -713,6 +756,7 @@ t_fedora:32:
- .build@template
- .fdo.distribution-image@fedora
- .nm_artifacts_debug
stage: tier3
variables:
FDO_DISTRIBUTION_VERSION: '32'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
@ -725,6 +769,7 @@ t_fedora:33:
- .build@template
- .fdo.distribution-image@fedora
- .nm_artifacts_debug
stage: tier3
variables:
FDO_DISTRIBUTION_VERSION: '33'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
@ -737,6 +782,7 @@ t_fedora:34:
- .build@template
- .fdo.distribution-image@fedora
- .nm_artifacts_debug
stage: tier3
variables:
FDO_DISTRIBUTION_VERSION: '34'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
@ -749,6 +795,7 @@ t_fedora:35:
- .build@template
- .fdo.distribution-image@fedora
- .nm_artifacts_debug
stage: tier3
variables:
FDO_DISTRIBUTION_VERSION: '35'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
@ -756,46 +803,12 @@ t_fedora:35:
- "fedora:35@container-prep"
when: manual
t_fedora:36:
extends:
- .build@template
- .fdo.distribution-image@fedora
- .nm_artifacts_debug
variables:
FDO_DISTRIBUTION_VERSION: '36'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "fedora:36@container-prep"
when: manual
t_fedora:37:
extends:
- .build@template
- .fdo.distribution-image@fedora
- .nm_artifacts
variables:
FDO_DISTRIBUTION_VERSION: '37'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "fedora:37@container-prep"
t_fedora:38:
extends:
- .build@template
- .fdo.distribution-image@fedora
- .nm_artifacts_debug
variables:
FDO_DISTRIBUTION_VERSION: '38'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "fedora:38@container-prep"
when: manual
t_ubuntu:18.04:
extends:
- .build@template
- .fdo.distribution-image@ubuntu
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: '18.04'
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
@ -808,6 +821,7 @@ t_ubuntu:20.04:
- .build@template
- .fdo.distribution-image@ubuntu
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: '20.04'
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
@ -820,6 +834,7 @@ t_ubuntu:22.04:
- .build@template
- .fdo.distribution-image@ubuntu
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: '22.04'
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
@ -832,6 +847,7 @@ t_ubuntu:devel:
- .build@template
- .fdo.distribution-image@ubuntu
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: 'devel'
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
@ -844,6 +860,7 @@ t_ubuntu:rolling:
- .build@template
- .fdo.distribution-image@ubuntu
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: 'rolling'
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
@ -851,23 +868,12 @@ t_ubuntu:rolling:
- "ubuntu:rolling@container-prep"
when: manual
t_debian:9:
extends:
- .build@template
- .fdo.distribution-image@debian
- .nm_artifacts_debug
variables:
FDO_DISTRIBUTION_VERSION: '9'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
needs:
- "debian:9@container-prep"
when: manual
t_debian:10:
extends:
- .build@template
- .fdo.distribution-image@debian
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: '10'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
@ -880,6 +886,7 @@ t_debian:11:
- .build@template
- .fdo.distribution-image@debian
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: '11'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
@ -887,23 +894,12 @@ t_debian:11:
- "debian:11@container-prep"
when: manual
t_debian:testing:
extends:
- .build@template
- .fdo.distribution-image@debian
- .nm_artifacts_debug
variables:
FDO_DISTRIBUTION_VERSION: 'testing'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
needs:
- "debian:testing@container-prep"
when: manual
t_debian:sid:
extends:
- .build@template
- .fdo.distribution-image@debian
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: 'sid'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
@ -911,11 +907,38 @@ t_debian:sid:
- "debian:sid@container-prep"
when: manual
t_debian:9:
extends:
- .build@template
- .fdo.distribution-image@debian
- .nm_artifacts_debug
stage: tier3
variables:
FDO_DISTRIBUTION_VERSION: '9'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
needs:
- "debian:9@container-prep"
when: manual
t_debian:testing:
extends:
- .build@template
- .fdo.distribution-image@debian
- .nm_artifacts_debug
stage: tier3
variables:
FDO_DISTRIBUTION_VERSION: 'testing'
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
needs:
- "debian:testing@container-prep"
when: manual
t_centos:7.5.1804:
extends:
- .build@template
- .fdo.distribution-image@centos
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: '7.5.1804'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
@ -923,47 +946,12 @@ t_centos:7.5.1804:
- "centos:7.5.1804@container-prep"
when: manual
t_centos:7.6.1810:
extends:
- .build@template
- .fdo.distribution-image@centos
- .nm_artifacts_debug
variables:
FDO_DISTRIBUTION_VERSION: '7.6.1810'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
needs:
- "centos:7.6.1810@container-prep"
when: manual
t_centos:7.7.1908:
extends:
- .build@template
- .fdo.distribution-image@centos
- .nm_artifacts_debug
variables:
FDO_DISTRIBUTION_VERSION: '7.7.1908'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
needs:
- "centos:7.7.1908@container-prep"
when: manual
t_centos:7.8.2003:
extends:
- .build@template
- .fdo.distribution-image@centos
- .nm_artifacts_debug
variables:
FDO_DISTRIBUTION_VERSION: '7.8.2003'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
needs:
- "centos:7.8.2003@container-prep"
when: manual
t_centos:7.9.2009:
extends:
- .build@template
- .fdo.distribution-image@centos
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: '7.9.2009'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
@ -976,6 +964,7 @@ t_centos:8.1.1911:
- .build@template
- .fdo.distribution-image@centos
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: '8.1.1911'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
@ -983,23 +972,12 @@ t_centos:8.1.1911:
- "centos:8.1.1911@container-prep"
when: manual
t_centos:8.2.2004:
extends:
- .build@template
- .fdo.distribution-image@centos
- .nm_artifacts_debug
variables:
FDO_DISTRIBUTION_VERSION: '8.2.2004'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
needs:
- "centos:8.2.2004@container-prep"
when: manual
t_centos:8.3.2011:
extends:
- .build@template
- .fdo.distribution-image@centos
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: '8.3.2011'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
@ -1007,11 +985,64 @@ t_centos:8.3.2011:
- "centos:8.3.2011@container-prep"
when: manual
t_centos:7.6.1810:
extends:
- .build@template
- .fdo.distribution-image@centos
- .nm_artifacts_debug
stage: tier3
variables:
FDO_DISTRIBUTION_VERSION: '7.6.1810'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
needs:
- "centos:7.6.1810@container-prep"
when: manual
t_centos:7.7.1908:
extends:
- .build@template
- .fdo.distribution-image@centos
- .nm_artifacts_debug
stage: tier3
variables:
FDO_DISTRIBUTION_VERSION: '7.7.1908'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
needs:
- "centos:7.7.1908@container-prep"
when: manual
t_centos:7.8.2003:
extends:
- .build@template
- .fdo.distribution-image@centos
- .nm_artifacts_debug
stage: tier3
variables:
FDO_DISTRIBUTION_VERSION: '7.8.2003'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
needs:
- "centos:7.8.2003@container-prep"
when: manual
t_centos:8.2.2004:
extends:
- .build@template
- .fdo.distribution-image@centos
- .nm_artifacts_debug
stage: tier3
variables:
FDO_DISTRIBUTION_VERSION: '8.2.2004'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
needs:
- "centos:8.2.2004@container-prep"
when: manual
t_alpine:latest:
extends:
- .build@template
- .fdo.distribution-image@alpine
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: 'latest'
FDO_DISTRIBUTION_TAG: $ALPINE_TAG
@ -1033,7 +1064,7 @@ check-patch:
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "fedora:37@container-prep"
stage: test
stage: tier1
script:
- date '+%Y%m%d-%H%M%S'; NM_CHECKPATCH_FETCH_UPSTREAM=1 contrib/scripts/checkpatch-feature-branch.sh
allow_failure: true
@ -1046,7 +1077,7 @@ check-tree:
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "fedora:37@container-prep"
stage: test
stage: tier1
script:
- date '+%Y%m%d-%H%M%S'; contrib/scripts/nm-python-black-format.sh --check
- date '+%Y%m%d-%H%M%S'; git ls-files -z -- 'po/*.po' | xargs -0 -n1 msgfmt -vc

View file

@ -17,17 +17,37 @@
.templates_sha: &template_sha ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
{# Group distros by their common (name,base_type,tag) tuples.#}
{% set distro_groups = [] %}
{% for distro in distributions %}
{% set g = {'name':distro.name,'base_type':distro.base_type,'tag':distro.tag} %}
{% if g not in distro_groups %}
{% do distro_groups.append(g) %}
{% endif %}
{% endfor %}
{# The "default_distro" builds our pages and is used for check-{tree,patch} tests. It is the first distro with tier 1. #}
{% set default_distro = [] %}
{% for distro in distributions %}
{% if distro.tier == 1 and default_distro|length == 0 %}
{% do default_distro.append(distro) %}
{% endif %}
{% endfor %}
{% set default_distro = default_distro[0] %}
include:
{% for distro in distributions|sort(attribute="name") %}
# {{ distro.name.capitalize() }} container builder template
{% for distro_group in distro_groups|sort(attribute='name') %}
# {{ distro_group.name.capitalize() }} container builder template
- project: 'freedesktop/ci-templates'
ref: *template_sha
file: '/templates/{{distro.name}}.yml'
file: '/templates/{{distro_group.name}}.yml'
{% endfor %}
stages:
- prep
- test
- tier1
- tier2
- tier3
- deploy
- triage
- container_clean
@ -41,17 +61,17 @@ variables:
#
# This is done by running `ci-fairy generate-template` and possibly bumping
# ".default_tag".
{% for distro in distributions %}
{{"%-13s"| format(distro.name.upper() + '_TAG:')}}'{{distro.tag}}-{{
{% for distro_group in distro_groups|sort(attribute='name') %}
{{"%-13s"| format(distro_group.name.upper() + '_TAG:')}}'{{distro_group.tag}}-{{
(ci_fairy.hashfiles('./.gitlab-ci/config.yml',
'./.gitlab-ci/ci.template',
'./.gitlab-ci/' + distro.base_type + '-install.sh',
'./contrib/' + distro.base_type + '/REQUIRED_PACKAGES'))[0:12]
'./.gitlab-ci/' + distro_group.base_type + '-install.sh',
'./contrib/' + distro_group.base_type + '/REQUIRED_PACKAGES'))[0:12]
}}'
{% endfor %}
{% for distro in distributions %}
{{"%-13s"| format(distro.name.upper() + '_EXEC:')}}'bash .gitlab-ci/{{distro.base_type}}-install.sh'
{% for distro_group in distro_groups|sort(attribute='name') %}
{{"%-13s"| format(distro_group.name.upper() + '_EXEC:')}}'bash .gitlab-ci/{{distro_group.base_type}}-install.sh'
{% endfor %}
.nm_artifacts:
@ -151,7 +171,6 @@ variables:
#################################################################
.build@template:
stage: test
script:
- env
- r=0
@ -174,12 +193,12 @@ t_{{distro.name}}:{{version}}:
extends:
- .build@template
- .fdo.distribution-image@{{distro.name}}
{% if distro.name == pages_build.name and
version == pages_build.version %}
{% if distro == default_distro %}
- .nm_artifacts
{% else %}
- .nm_artifacts_debug
{% endif %}
stage: tier{{distro.tier}}
variables:
FDO_DISTRIBUTION_VERSION: '{{version}}'
FDO_DISTRIBUTION_TAG: ${{distro.name.upper()}}_TAG
@ -191,7 +210,7 @@ t_{{distro.name}}:{{version}}:
{% endif %}
needs:
- "{{distro.name}}:{{version}}@container-prep"
{% if not version in distro.get('always', []) and (distro.name != pages_build.name or version != pages_build.version) %}
{% if distro.tier > 1 %}
when: manual
{% endif %}
{% endfor %}
@ -205,26 +224,26 @@ t_{{distro.name}}:{{version}}:
check-patch:
extends:
- .fdo.distribution-image@{{pages_build.name}}
- .fdo.distribution-image@{{default_distro.name}}
variables:
FDO_DISTRIBUTION_VERSION: '{{pages_build.version}}'
FDO_DISTRIBUTION_TAG: ${{pages_build.name.upper()}}_TAG
FDO_DISTRIBUTION_VERSION: '{{default_distro.versions[0]}}'
FDO_DISTRIBUTION_TAG: ${{default_distro.name.upper()}}_TAG
needs:
- "{{pages_build.name}}:{{pages_build.version}}@container-prep"
stage: test
- "{{default_distro.name}}:{{default_distro.versions[0]}}@container-prep"
stage: tier1
script:
- date '+%Y%m%d-%H%M%S'; NM_CHECKPATCH_FETCH_UPSTREAM=1 contrib/scripts/checkpatch-feature-branch.sh
allow_failure: true
check-tree:
extends:
- .fdo.distribution-image@{{pages_build.name}}
- .fdo.distribution-image@{{default_distro.name}}
variables:
FDO_DISTRIBUTION_VERSION: '{{pages_build.version}}'
FDO_DISTRIBUTION_TAG: ${{pages_build.name.upper()}}_TAG
FDO_DISTRIBUTION_VERSION: '{{default_distro.versions[0]}}'
FDO_DISTRIBUTION_TAG: ${{default_distro.name.upper()}}_TAG
needs:
- "{{pages_build.name}}:{{pages_build.version}}@container-prep"
stage: test
- "{{default_distro.name}}:{{default_distro.versions[0]}}@container-prep"
stage: tier1
script:
- date '+%Y%m%d-%H%M%S'; contrib/scripts/nm-python-black-format.sh --check
- date '+%Y%m%d-%H%M%S'; git ls-files -z -- 'po/*.po' | xargs -0 -n1 msgfmt -vc
@ -242,9 +261,9 @@ pages:
only:
- main
dependencies:
- t_{{pages_build.name}}:{{pages_build.version}}
- t_{{default_distro.name}}:{{default_distro.versions[0]}}
needs:
- t_{{pages_build.name}}:{{pages_build.version}}
- t_{{default_distro.name}}:{{default_distro.versions[0]}}
triage:issues:
stage: triage

View file

@ -8,7 +8,7 @@
#
# We're happy to rebuild all containers when one changes.
.default_tag: &default_tag '2023-01-18.0'
.default_tag: &default_tag '2023-04-11.0'
# The list of all distributions we want to create job for.
@ -17,6 +17,21 @@ distributions:
- name: fedora
tag: *default_tag
base_type: fedora
# Tier1 is used to build the pages and check-{tree,patch}
tier: 1
versions:
- '37'
- name: fedora
tag: *default_tag
base_type: fedora
tier: 2
versions:
- '36'
- '38'
- name: fedora
tag: *default_tag
base_type: fedora
tier: 3
versions:
- '30'
- '31'
@ -24,12 +39,10 @@ distributions:
- '33'
- '34'
- '35'
- '36'
- '37'
- '38'
- name: ubuntu
tag: *default_tag
base_type: debian
tier: 2
versions:
- '18.04'
- '20.04'
@ -39,31 +52,39 @@ distributions:
- name: debian
tag: *default_tag
base_type: debian
tier: 2
versions:
- '9'
- '10'
- '11'
- 'testing'
- 'sid'
- name: debian
tag: *default_tag
base_type: debian
tier: 3
versions:
- '9'
- 'testing'
- name: centos
tag: *default_tag
base_type: fedora
tier: 2
versions:
- '7.5.1804'
- '7.9.2009'
- '8.1.1911'
- '8.3.2011'
- name: centos
tag: *default_tag
base_type: fedora
tier: 3
versions:
- '7.6.1810'
- '7.7.1908'
- '7.8.2003'
- '7.9.2009'
- '8.1.1911'
- '8.2.2004'
- '8.3.2011'
- name: alpine
tag: *default_tag
base_type: alpine
tier: 2
versions:
- 'latest'
# specifies which of the above distros is used as source for pages
pages_build:
name: fedora
version: '37'