CentOS 8: Add zuul build and publish jobs

Adds build and publishing jobs for CentOS 8 images:

- kolla-build-centos8-binary
- kolla-build-centos8-source
- kolla-publish-centos8-binary
- kolla-publish-centos8-source

The 'base' image has been added to the list of unbuildable images for
CentOS 8 (now separate from the list for CentOS 7). This means that no
images will be built - the jobs should essentially be a 'noop'.

Change-Id: Ie9a0109bd4eef337358d714e4b5088b8e3de2f23
Partially-Implements: blueprint centos-rhel-8
This commit is contained in:
Mark Goddard 2020-01-09 13:27:19 +00:00
parent 71489044da
commit b060623b90
5 changed files with 90 additions and 2 deletions

View File

@ -4,6 +4,8 @@
jobs:
- kolla-build-centos-binary
- kolla-build-centos-source
- kolla-build-centos8-binary
- kolla-build-centos8-source
- kolla-ansible-centos-source
- kolla-ansible-centos-binary
- kolla-ansible-centos-source-upgrade
@ -33,6 +35,7 @@
queue: kolla
jobs:
- kolla-build-centos-source
- kolla-build-centos8-source
- kolla-ansible-centos-source
- kolla-ansible-centos-source-upgrade
- tripleo-build-containers-centos-7:
@ -48,10 +51,14 @@
jobs:
- kolla-publish-centos-source
- kolla-publish-centos-binary
- kolla-publish-centos8-source
- kolla-publish-centos8-binary
release:
jobs:
- kolla-publish-centos-source
- kolla-publish-centos-binary
- kolla-publish-centos8-source
- kolla-publish-centos8-binary
- job:
name: kolla-build-centos-binary
@ -63,6 +70,12 @@
base_distro: centos
install_type: binary
- job:
name: kolla-build-centos8-binary
parent: kolla-build-centos-binary
vars:
base_tag: 8
- job:
name: kolla-publish-centos-binary
parent: kolla-build-centos-binary
@ -72,6 +85,12 @@
secrets:
- kolla_dockerhub_creds
- job:
name: kolla-publish-centos8-binary
parent: kolla-publish-centos-binary
vars:
base_tag: 8
- job:
name: kolla-build-centos-source
parent: kolla-base
@ -81,6 +100,12 @@
base_distro: centos
install_type: source
- job:
name: kolla-build-centos8-source
parent: kolla-build-centos-source
vars:
base_tag: 8
- job:
name: kolla-publish-centos-source
parent: kolla-build-centos-source
@ -89,3 +114,9 @@
publisher: true
secrets:
- kolla_dockerhub_creds
- job:
name: kolla-publish-centos8-source
parent: kolla-publish-centos-source
vars:
base_tag: 8

View File

@ -142,6 +142,11 @@ UNBUILDABLE_IMAGES = {
"ovsdpdk",
},
# NOTE(mgoddard): Mark all images unbuildable for CentOS 8.
'centos8': {
"base",
},
'debian': {
"bifrost-base", # tries to install 'mysql-server' which is not in
# Debian 'buster'
@ -1042,7 +1047,15 @@ class KollaWorker(object):
filter_ += self.conf.profiles[profile]
# mark unbuildable images and their children
tag_element = r'(%s|%s|%s)' % (self.base,
# NOTE(mgoddard): Use a base of centos8 to allow a different set of
# unbuildable images for CentOS 8.
# TODO(mgoddard): Remove this after CentOS 8 transition.
base = self.base
if base == 'centos' and self.distro_package_manager == 'dnf':
base = 'centos8'
tag_element = r'(%s|%s|%s)' % (base,
self.install_type,
self.base_arch)
tag_re = re.compile(r'^%s(\+%s)*$' % (tag_element, tag_element))

View File

@ -33,6 +33,6 @@
dest: /etc/kolla/template_overrides.j2
- name: Run tox
command: tox -e {{ action }}-{{ base_distro }}-{{ install_type }}
command: tox -e {{ action }}-{{ base_distro }}{{ base_tag | default('') }}-{{ install_type }}
args:
chdir: "{{ zuul.project.src_dir }}"

View File

@ -79,6 +79,30 @@ class BuildTestCentosSource(BuildTest, base.BaseTestCase):
"--type", "source"])
class BuildTestCentos8Binary(BuildTest, base.BaseTestCase):
def setUp(self):
super(BuildTestCentos8Binary, self).setUp()
# TODO(mgoddard): Remove --base-tag and --tag arguments when CentOS 8
# is the default.
self.build_args.extend(["--base", "centos",
"--base-tag", "8",
"--tag", "master-centos8",
"--type", "binary"])
class BuildTestCentos8Source(BuildTest, base.BaseTestCase):
def setUp(self):
super(BuildTestCentos8Source, self).setUp()
# TODO(mgoddard): Remove --base-tag and --tag arguments when CentOS 8
# is the default.
self.build_args.extend(["--base", "centos",
"--base-tag", "8",
"--tag", "master-centos8",
"--type", "source"])
class BuildTestUbuntuBinary(BuildTest, base.BaseTestCase):
def setUp(self):

20
tox.ini
View File

@ -111,6 +111,26 @@ commands =
bash -c "if [ ! -d .stestr ]; then stestr init; fi"
stestr run test_build.BuildTestCentosSource
[testenv:build-centos8-binary]
whitelist_externals = find
bash
setenv =
DOCKER_BUILD_TEST=1
commands =
find . -type f -name "*.py[c|o]" -delete -o -type l -name "*.py[c|o]" -delete
bash -c "if [ ! -d .stestr ]; then stestr init; fi"
stestr run test_build.BuildTestCentos8Binary
[testenv:build-centos8-source]
whitelist_externals = find
bash
setenv =
DOCKER_BUILD_TEST=1
commands =
find . -type f -name "*.py[c|o]" -delete -o -type l -name "*.py[c|o]" -delete
bash -c "if [ ! -d .stestr ]; then stestr init; fi"
stestr run test_build.BuildTestCentos8Source
[testenv:build-ubuntu-binary]
whitelist_externals = find
bash