From 76841d99ec35dccf7231ef67938aaf3629957a6e Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Mon, 14 Feb 2022 15:21:40 +0100 Subject: Build CentOS Stream 8 images This is part of the effort to allow a migration path for operators using CentOS 7 and Train today. Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/831265 Change-Id: I75373eb21c4269c20f72603ad4cf162a472de25b (cherry picked from commit 67d6d28b6208cc004a50f19be1386d88c2404bc4) --- tests/templates/kolla-build.conf.j2 | 5 ++++- tests/test_build.py | 14 ++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/templates/kolla-build.conf.j2 b/tests/templates/kolla-build.conf.j2 index e66006ef4..bdc6060ab 100644 --- a/tests/templates/kolla-build.conf.j2 +++ b/tests/templates/kolla-build.conf.j2 @@ -1,5 +1,8 @@ [DEFAULT] debug = true +{% if ansible_distribution | lower == 'centos' and base_tag | default == 'stream8' %} +base_image = quay.io/centos/centos +{% endif %} {% if publisher %} namespace = kolla {# NOTE(hrw): we do not publish centos images for aarch64 so can just override #} @@ -7,7 +10,7 @@ namespace = kolla {% set tag_suffix = '-aarch64' %} {% else %} {# TODO(mgoddard): Remove tag_suffix when CentOS 7 is no longer supported. #} -{% set tag_suffix = '-centos8' if ansible_distribution | lower == 'centos' and base_tag | default == 8 else '' %} +{% set tag_suffix = '-centos8s' if ansible_distribution | lower == 'centos' and base_tag | default == 'stream8' else '' %} {% endif %} tag = {{ (zuul.tag if zuul.pipeline == "release" else zuul.branch | basename) ~ tag_suffix }} {% endif %} diff --git a/tests/test_build.py b/tests/test_build.py index 38116d134..fad696b44 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -79,25 +79,27 @@ class BuildTestCentosSource(BuildTest, base.BaseTestCase): "--type", "source"]) -class BuildTestCentos8Binary(BuildTest, base.BaseTestCase): +class BuildTestCentosStream8Binary(BuildTest, base.BaseTestCase): def setUp(self): - super(BuildTestCentos8Binary, self).setUp() + super(BuildTestCentosStream8Binary, self).setUp() # TODO(mgoddard): Remove --base-tag argument when CentOS 8 is the # default. self.build_args.extend(["--base", "centos", - "--base-tag", "8", + "--base-tag", "stream8", + "--base-image", "quay.io/centos/centos", "--type", "binary"]) -class BuildTestCentos8Source(BuildTest, base.BaseTestCase): +class BuildTestCentosStream8Source(BuildTest, base.BaseTestCase): def setUp(self): - super(BuildTestCentos8Source, self).setUp() + super(BuildTestCentosStream8Source, self).setUp() # TODO(mgoddard): Remove --base-tag argument when CentOS 8 is the # default. self.build_args.extend(["--base", "centos", - "--base-tag", "8", + "--base-tag", "stream8", + "--base-image", "quay.io/centos/centos", "--type", "source"]) -- cgit v1.2.3