gitlab CI: use the new templates with a single job only

No more ifnot-exists, it's all build now with a variable to control the forced
rebuild.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-03-13 14:17:15 +10:00
parent 87a91718ef
commit 9ffed2f2f4
3 changed files with 68 additions and 122 deletions

View file

@ -4,7 +4,7 @@
# # # #
######################################## ########################################
.templates_sha: &template_sha 2469555cd0a6b621b988e100ddd746c2ad0cdd1d # see https://docs.gitlab.com/ee/ci/yaml/#includefile .templates_sha: &template_sha d32ac1f30faad4fdef24af8a7724fb8c084c3dda # see https://docs.gitlab.com/ee/ci/yaml/#includefile
include: include:
# Alpine container builder template # Alpine container builder template
@ -77,63 +77,63 @@ variables:
- .gitlab-ci/meson-build.sh - .gitlab-ci/meson-build.sh
.fedora:30: .fedora:30:
extends: .fdo.distribution_image@fedora extends: .fdo.distribution-image@fedora
variables: variables:
FDO_DISTRIBUTION_TAG: '2020-03-13.0' FDO_DISTRIBUTION_TAG: '2020-03-17.0'
FDO_DISTRIBUTION_VERSION: '30' FDO_DISTRIBUTION_VERSION: '30'
.fedora:31: .fedora:31:
extends: .fdo.distribution_image@fedora extends: .fdo.distribution-image@fedora
variables: variables:
FDO_DISTRIBUTION_TAG: '2020-03-13.0' FDO_DISTRIBUTION_TAG: '2020-03-17.0'
FDO_DISTRIBUTION_VERSION: '31' FDO_DISTRIBUTION_VERSION: '31'
.ubuntu:19.10: .ubuntu:19.10:
extends: .fdo.distribution_image@ubuntu extends: .fdo.distribution-image@ubuntu
variables: variables:
FDO_DISTRIBUTION_TAG: '2020-03-13.0' FDO_DISTRIBUTION_TAG: '2020-03-17.0'
FDO_DISTRIBUTION_VERSION: '19.10' FDO_DISTRIBUTION_VERSION: '19.10'
.ubuntu:19.04: .ubuntu:19.04:
extends: .fdo.distribution_image@ubuntu extends: .fdo.distribution-image@ubuntu
variables: variables:
FDO_DISTRIBUTION_TAG: '2020-03-13.0' FDO_DISTRIBUTION_TAG: '2020-03-17.0'
FDO_DISTRIBUTION_VERSION: '19.04' FDO_DISTRIBUTION_VERSION: '19.04'
.debian:stable: .debian:stable:
extends: .fdo.distribution_image@debian extends: .fdo.distribution-image@debian
variables: variables:
FDO_DISTRIBUTION_TAG: '2020-03-13.0' FDO_DISTRIBUTION_TAG: '2020-03-17.0'
FDO_DISTRIBUTION_VERSION: 'stable' FDO_DISTRIBUTION_VERSION: 'stable'
.debian:sid: .debian:sid:
extends: .fdo.distribution_image@debian extends: .fdo.distribution-image@debian
variables: variables:
FDO_DISTRIBUTION_TAG: '2020-03-13.0' FDO_DISTRIBUTION_TAG: '2020-03-17.0'
FDO_DISTRIBUTION_VERSION: 'sid' FDO_DISTRIBUTION_VERSION: 'sid'
.centos:7: .centos:7:
extends: .fdo.distribution_image@centos extends: .fdo.distribution-image@centos
variables: variables:
FDO_DISTRIBUTION_TAG: '2020-03-13.0' FDO_DISTRIBUTION_TAG: '2020-03-17.0'
FDO_DISTRIBUTION_VERSION: '7' FDO_DISTRIBUTION_VERSION: '7'
.centos:8: .centos:8:
extends: .fdo.distribution_image@centos extends: .fdo.distribution-image@centos
variables: variables:
FDO_DISTRIBUTION_TAG: '2020-03-13.0' FDO_DISTRIBUTION_TAG: '2020-03-17.0'
FDO_DISTRIBUTION_VERSION: '8' FDO_DISTRIBUTION_VERSION: '8'
.arch:rolling: .arch:rolling:
extends: .fdo.distribution_image@arch extends: .fdo.distribution-image@arch
variables: variables:
FDO_DISTRIBUTION_TAG: '2020-03-13.0' FDO_DISTRIBUTION_TAG: '2020-03-17.0'
FDO_DISTRIBUTION_VERSION: 'rolling' FDO_DISTRIBUTION_VERSION: 'rolling'
.alpine:latest: .alpine:latest:
extends: .fdo.distribution_image@alpine extends: .fdo.distribution-image@alpine
variables: variables:
FDO_DISTRIBUTION_TAG: '2020-03-13.0' FDO_DISTRIBUTION_TAG: '2020-03-17.0'
FDO_DISTRIBUTION_VERSION: 'latest' FDO_DISTRIBUTION_VERSION: 'latest'
@ -215,28 +215,21 @@ check-commit:
extends: extends:
- .fedora:30 - .fedora:30
- .fedora.packages - .fedora.packages
- .fdo.qemu-ifnot-exists@fedora - .fdo.qemu-build@fedora
stage: prep stage: prep
tags: tags:
- kvm - kvm
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
FDO_DISTRIBUTION_TAG: qemu-2020-03-13.0 FDO_DISTRIBUTION_TAG: qemu-2020-03-17.0
allow_failure: true allow_failure: true
# Always rebuilds the container # Always rebuilds the container
.fedora:30@qemu-forced-rebuild: .fedora:30@qemu-forced-rebuild:
extends: extends:
- .fedora:30 - .fedora:30@qemu-prep
- .fedora.packages
- .fdo.qemu-ifnot-exists@fedora
stage: prep
tags:
- kvm
variables: variables:
GIT_STRATEGY: none FDO_FORCE_REBUILD: 1
FDO_DISTRIBUTION_TAG: qemu-2020-03-13.0
allow_failure: true
only: only:
- schedules - schedules
@ -245,28 +238,21 @@ check-commit:
extends: extends:
- .fedora:31 - .fedora:31
- .fedora.packages - .fedora.packages
- .fdo.qemu-ifnot-exists@fedora - .fdo.qemu-build@fedora
stage: prep stage: prep
tags: tags:
- kvm - kvm
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
FDO_DISTRIBUTION_TAG: qemu-2020-03-13.0 FDO_DISTRIBUTION_TAG: qemu-2020-03-17.0
allow_failure: true allow_failure: true
# Always rebuilds the container # Always rebuilds the container
.fedora:31@qemu-forced-rebuild: .fedora:31@qemu-forced-rebuild:
extends: extends:
- .fedora:31 - .fedora:31@qemu-prep
- .fedora.packages
- .fdo.qemu-ifnot-exists@fedora
stage: prep
tags:
- kvm
variables: variables:
GIT_STRATEGY: none FDO_FORCE_REBUILD: 1
FDO_DISTRIBUTION_TAG: qemu-2020-03-13.0
allow_failure: true
only: only:
- schedules - schedules
@ -284,7 +270,7 @@ fedora:30@container-prep:
extends: extends:
- .fedora:30 - .fedora:30
- .fedora.packages - .fedora.packages
- .fdo.container-ifnot-exists@fedora - .fdo.container-build@fedora
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
@ -292,14 +278,11 @@ fedora:30@container-prep:
# Always rebuilds the container # Always rebuilds the container
fedora:30@container-forced-rebuild: fedora:30@container-forced-rebuild:
extends: extends:
- .fedora:30 - fedora:30@container-prep
- .fedora.packages
- .fdo.container-build@fedora
stage: prep
only: only:
- schedules - schedules
variables: variables:
GIT_STRATEGY: none FDO_FORCE_REBUILD: 1
# Pulls in the container from upstream or rebuilds it if missing # Pulls in the container from upstream or rebuilds it if missing
@ -307,7 +290,7 @@ fedora:31@container-prep:
extends: extends:
- .fedora:31 - .fedora:31
- .fedora.packages - .fedora.packages
- .fdo.container-ifnot-exists@fedora - .fdo.container-build@fedora
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
@ -315,14 +298,11 @@ fedora:31@container-prep:
# Always rebuilds the container # Always rebuilds the container
fedora:31@container-forced-rebuild: fedora:31@container-forced-rebuild:
extends: extends:
- .fedora:31 - fedora:31@container-prep
- .fedora.packages
- .fdo.container-build@fedora
stage: prep
only: only:
- schedules - schedules
variables: variables:
GIT_STRATEGY: none FDO_FORCE_REBUILD: 1
# Pulls in the container from upstream or rebuilds it if missing # Pulls in the container from upstream or rebuilds it if missing
@ -330,7 +310,7 @@ ubuntu:19.10@container-prep:
extends: extends:
- .ubuntu:19.10 - .ubuntu:19.10
- .ubuntu.packages - .ubuntu.packages
- .fdo.container-ifnot-exists@ubuntu - .fdo.container-build@ubuntu
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
@ -338,14 +318,11 @@ ubuntu:19.10@container-prep:
# Always rebuilds the container # Always rebuilds the container
ubuntu:19.10@container-forced-rebuild: ubuntu:19.10@container-forced-rebuild:
extends: extends:
- .ubuntu:19.10 - ubuntu:19.10@container-prep
- .ubuntu.packages
- .fdo.container-build@ubuntu
stage: prep
only: only:
- schedules - schedules
variables: variables:
GIT_STRATEGY: none FDO_FORCE_REBUILD: 1
# Pulls in the container from upstream or rebuilds it if missing # Pulls in the container from upstream or rebuilds it if missing
@ -353,7 +330,7 @@ ubuntu:19.04@container-prep:
extends: extends:
- .ubuntu:19.04 - .ubuntu:19.04
- .ubuntu.packages - .ubuntu.packages
- .fdo.container-ifnot-exists@ubuntu - .fdo.container-build@ubuntu
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
@ -361,14 +338,11 @@ ubuntu:19.04@container-prep:
# Always rebuilds the container # Always rebuilds the container
ubuntu:19.04@container-forced-rebuild: ubuntu:19.04@container-forced-rebuild:
extends: extends:
- .ubuntu:19.04 - ubuntu:19.04@container-prep
- .ubuntu.packages
- .fdo.container-build@ubuntu
stage: prep
only: only:
- schedules - schedules
variables: variables:
GIT_STRATEGY: none FDO_FORCE_REBUILD: 1
# Pulls in the container from upstream or rebuilds it if missing # Pulls in the container from upstream or rebuilds it if missing
@ -376,7 +350,7 @@ debian:stable@container-prep:
extends: extends:
- .debian:stable - .debian:stable
- .debian.packages - .debian.packages
- .fdo.container-ifnot-exists@debian - .fdo.container-build@debian
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
@ -384,14 +358,11 @@ debian:stable@container-prep:
# Always rebuilds the container # Always rebuilds the container
debian:stable@container-forced-rebuild: debian:stable@container-forced-rebuild:
extends: extends:
- .debian:stable - debian:stable@container-prep
- .debian.packages
- .fdo.container-build@debian
stage: prep
only: only:
- schedules - schedules
variables: variables:
GIT_STRATEGY: none FDO_FORCE_REBUILD: 1
# Pulls in the container from upstream or rebuilds it if missing # Pulls in the container from upstream or rebuilds it if missing
@ -399,7 +370,7 @@ debian:sid@container-prep:
extends: extends:
- .debian:sid - .debian:sid
- .debian.packages - .debian.packages
- .fdo.container-ifnot-exists@debian - .fdo.container-build@debian
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
@ -407,14 +378,11 @@ debian:sid@container-prep:
# Always rebuilds the container # Always rebuilds the container
debian:sid@container-forced-rebuild: debian:sid@container-forced-rebuild:
extends: extends:
- .debian:sid - debian:sid@container-prep
- .debian.packages
- .fdo.container-build@debian
stage: prep
only: only:
- schedules - schedules
variables: variables:
GIT_STRATEGY: none FDO_FORCE_REBUILD: 1
# Pulls in the container from upstream or rebuilds it if missing # Pulls in the container from upstream or rebuilds it if missing
@ -422,7 +390,7 @@ centos:7@container-prep:
extends: extends:
- .centos:7 - .centos:7
- .centos.packages - .centos.packages
- .fdo.container-ifnot-exists@centos - .fdo.container-build@centos
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
@ -430,14 +398,11 @@ centos:7@container-prep:
# Always rebuilds the container # Always rebuilds the container
centos:7@container-forced-rebuild: centos:7@container-forced-rebuild:
extends: extends:
- .centos:7 - centos:7@container-prep
- .centos.packages
- .fdo.container-build@centos
stage: prep
only: only:
- schedules - schedules
variables: variables:
GIT_STRATEGY: none FDO_FORCE_REBUILD: 1
# Pulls in the container from upstream or rebuilds it if missing # Pulls in the container from upstream or rebuilds it if missing
@ -445,7 +410,7 @@ centos:8@container-prep:
extends: extends:
- .centos:8 - .centos:8
- .centos.packages - .centos.packages
- .fdo.container-ifnot-exists@centos - .fdo.container-build@centos
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
@ -453,14 +418,11 @@ centos:8@container-prep:
# Always rebuilds the container # Always rebuilds the container
centos:8@container-forced-rebuild: centos:8@container-forced-rebuild:
extends: extends:
- .centos:8 - centos:8@container-prep
- .centos.packages
- .fdo.container-build@centos
stage: prep
only: only:
- schedules - schedules
variables: variables:
GIT_STRATEGY: none FDO_FORCE_REBUILD: 1
# Pulls in the container from upstream or rebuilds it if missing # Pulls in the container from upstream or rebuilds it if missing
@ -468,7 +430,7 @@ arch:rolling@container-prep:
extends: extends:
- .arch:rolling - .arch:rolling
- .arch.packages - .arch.packages
- .fdo.container-ifnot-exists@arch - .fdo.container-build@arch
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
@ -476,14 +438,11 @@ arch:rolling@container-prep:
# Always rebuilds the container # Always rebuilds the container
arch:rolling@container-forced-rebuild: arch:rolling@container-forced-rebuild:
extends: extends:
- .arch:rolling - arch:rolling@container-prep
- .arch.packages
- .fdo.container-build@arch
stage: prep
only: only:
- schedules - schedules
variables: variables:
GIT_STRATEGY: none FDO_FORCE_REBUILD: 1
# Pulls in the container from upstream or rebuilds it if missing # Pulls in the container from upstream or rebuilds it if missing
@ -491,7 +450,7 @@ alpine:latest@container-prep:
extends: extends:
- .alpine:latest - .alpine:latest
- .alpine.packages - .alpine.packages
- .fdo.container-ifnot-exists@alpine - .fdo.container-build@alpine
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
@ -499,14 +458,11 @@ alpine:latest@container-prep:
# Always rebuilds the container # Always rebuilds the container
alpine:latest@container-forced-rebuild: alpine:latest@container-forced-rebuild:
extends: extends:
- .alpine:latest - alpine:latest@container-prep
- .alpine.packages
- .fdo.container-build@alpine
stage: prep
only: only:
- schedules - schedules
variables: variables:
GIT_STRATEGY: none FDO_FORCE_REBUILD: 1
################################################################# #################################################################

View file

@ -3,7 +3,7 @@
# #
# We're happy to rebuild all containers when one changes. # We're happy to rebuild all containers when one changes.
.default_tag: &default_tag '2020-03-13.0' .default_tag: &default_tag '2020-03-17.0'
distributions: distributions:
- name: fedora - name: fedora

View file

@ -6,7 +6,7 @@
# # # #
######################################## ########################################
.templates_sha: &template_sha 2469555cd0a6b621b988e100ddd746c2ad0cdd1d # see https://docs.gitlab.com/ee/ci/yaml/#includefile .templates_sha: &template_sha d32ac1f30faad4fdef24af8a7724fb8c084c3dda # see https://docs.gitlab.com/ee/ci/yaml/#includefile
include: include:
{% for distribution in distributions|map(attribute='name')|unique()|sort() %} {% for distribution in distributions|map(attribute='name')|unique()|sort() %}
@ -66,7 +66,7 @@ variables:
{% for distro in distributions %} {% for distro in distributions %}
{% for version in distro.versions %} {% for version in distro.versions %}
.{{distro.name}}:{{version}}: .{{distro.name}}:{{version}}:
extends: .fdo.distribution_image@{{distro.name}} extends: .fdo.distribution-image@{{distro.name}}
variables: variables:
FDO_DISTRIBUTION_TAG: '{{distro.tag}}' FDO_DISTRIBUTION_TAG: '{{distro.tag}}'
FDO_DISTRIBUTION_VERSION: '{{version}}' FDO_DISTRIBUTION_VERSION: '{{version}}'
@ -137,7 +137,7 @@ check-commit:
extends: extends:
- .{{ distro.name }}:{{ version }} - .{{ distro.name }}:{{ version }}
- .{{ distro.name}}.packages - .{{ distro.name}}.packages
- .fdo.qemu-ifnot-exists@fedora - .fdo.qemu-build@fedora
stage: prep stage: prep
tags: tags:
- kvm - kvm
@ -149,16 +149,9 @@ check-commit:
# Always rebuilds the container # Always rebuilds the container
.{{ distro.name }}:{{ version }}@qemu-forced-rebuild: .{{ distro.name }}:{{ version }}@qemu-forced-rebuild:
extends: extends:
- .{{ distro.name }}:{{ version }} - .{{ distro.name }}:{{ version }}@qemu-prep
- .{{ distro.name}}.packages
- .fdo.qemu-ifnot-exists@fedora
stage: prep
tags:
- kvm
variables: variables:
GIT_STRATEGY: none FDO_FORCE_REBUILD: 1
FDO_DISTRIBUTION_TAG: qemu-{{ distro.tag }}
allow_failure: true
only: only:
- schedules - schedules
@ -181,7 +174,7 @@ fedora:31@qemu-forced-rebuild:
extends: extends:
- .{{ distro.name }}:{{ version }} - .{{ distro.name }}:{{ version }}
- .{{ distro.name}}.packages - .{{ distro.name}}.packages
- .fdo.container-ifnot-exists@{{ distro.name }} - .fdo.container-build@{{ distro.name }}
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
@ -189,14 +182,11 @@ fedora:31@qemu-forced-rebuild:
# Always rebuilds the container # Always rebuilds the container
{{ distro.name }}:{{ version }}@container-forced-rebuild: {{ distro.name }}:{{ version }}@container-forced-rebuild:
extends: extends:
- .{{ distro.name }}:{{ version }} - {{ distro.name }}:{{ version }}@container-prep
- .{{ distro.name}}.packages
- .fdo.container-build@{{ distro.name }}
stage: prep
only: only:
- schedules - schedules
variables: variables:
GIT_STRATEGY: none FDO_FORCE_REBUILD: 1
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}