gitlab-ci: merge branch 'th/gitlab-ci-enable-centos8'

This commit is contained in:
Thomas Haller 2022-02-21 17:03:44 +01:00
commit b610bdf66e
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
4 changed files with 115 additions and 10 deletions

View file

@ -7,7 +7,7 @@
########################################
.templates_sha: &template_sha 14731f78c23c7b523a85a26a068ade9ac1ecd2f3 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
.templates_sha: &template_sha 3e66ea37e5672bb8f48e3056ba92915b5fc5b888 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
include:
# Alpine container builder template
@ -47,11 +47,11 @@ variables:
#
# This is done by running `ci-fairy generate-template` and possibly bump
# ".default_tag".
FEDORA_TAG: '2022-02-14.0-8384452eb54e'
UBUNTU_TAG: '2022-02-14.0-bd3c060f94c2'
DEBIAN_TAG: '2022-02-14.0-bd3c060f94c2'
CENTOS_TAG: '2022-02-14.0-8384452eb54e'
ALPINE_TAG: '2022-02-14.0-0990abecb69f'
FEDORA_TAG: '2022-02-21.0-f42312ef8cae'
UBUNTU_TAG: '2022-02-21.0-ab561a08b357'
DEBIAN_TAG: '2022-02-21.0-ab561a08b357'
CENTOS_TAG: '2022-02-21.0-f42312ef8cae'
ALPINE_TAG: '2022-02-21.0-bad60eeb6900'
FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh'
UBUNTU_EXEC: 'bash .gitlab-ci/debian-install.sh'
@ -304,6 +304,36 @@ centos:7.9.2009@container-prep:
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
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: '8.2.2004'
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
@ -546,6 +576,33 @@ centos:7.9.2009@container-clean:
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
variables:
GIT_STRATEGY: none
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
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
@ -817,6 +874,39 @@ t_centos:7.9.2009:
- "centos:7.9.2009@container-prep"
when: manual
t_centos:8.1.1911:
extends:
- .build@template
- .fdo.distribution-image@centos
variables:
FDO_DISTRIBUTION_VERSION: '8.1.1911'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
needs:
- "centos:8.1.1911@container-prep"
when: manual
t_centos:8.2.2004:
extends:
- .build@template
- .fdo.distribution-image@centos
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
variables:
FDO_DISTRIBUTION_VERSION: '8.3.2011'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
needs:
- "centos:8.3.2011@container-prep"
when: manual
t_alpine:latest:
extends:
- .build@template

View file

@ -9,7 +9,7 @@
########################################
.templates_sha: &template_sha 14731f78c23c7b523a85a26a068ade9ac1ecd2f3 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
.templates_sha: &template_sha 3e66ea37e5672bb8f48e3056ba92915b5fc5b888 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
include:
{% for distro in distributions|sort(attribute="name") %}

View file

@ -8,7 +8,7 @@
#
# We're happy to rebuild all containers when one changes.
.default_tag: &default_tag '2022-02-14.0'
.default_tag: &default_tag '2022-02-21.0'
# The list of all distributions we want to create job for.
@ -52,6 +52,9 @@ distributions:
- '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

View file

@ -5,13 +5,18 @@ set -ex
IS_FEDORA=0
IS_CENTOS=0
IS_CENTOS_7=0
IS_CENTOS_8=0
grep -q '^NAME=.*\(CentOS\)' /etc/os-release && IS_CENTOS=1
grep -q '^NAME=.*\(Fedora\)' /etc/os-release && IS_FEDORA=1
if [ $IS_CENTOS = 1 ]; then
grep -q '^VERSION_ID=.*\<7\>' /etc/os-release && IS_CENTOS_7=1
if grep -q '^VERSION_ID=.*\<7\>' /etc/os-release ; then
IS_CENTOS_7=1
elif grep -q '^VERSION_ID=.*\<8\>' /etc/os-release ; then
IS_CENTOS_8=1
fi
fi
if [ $IS_CENTOS = 1 ]; then
if [ $IS_CENTOS = 1 ]; then
if [ $IS_CENTOS_7 = 1 ]; then
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y glibc-common
@ -19,6 +24,13 @@ if [ $IS_CENTOS = 1 ]; then
locale -a
yum install -y python36-dbus python36-gobject-base
else
if [ $IS_CENTOS_8 = 1 ]; then
# CentOS Linux 8 is now EOF and plain `dnf upgrade` does not work. We need
# to patch the mirror list.
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
fi
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install -y 'dnf-command(config-manager)'
dnf config-manager --set-enabled powertools || \