aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zuul.d/centos.yaml31
-rwxr-xr-xkolla/image/build.py15
-rw-r--r--tests/playbooks/run.yml2
-rw-r--r--tests/test_build.py24
-rw-r--r--tox.ini20
5 files changed, 90 insertions, 2 deletions
diff --git a/.zuul.d/centos.yaml b/.zuul.d/centos.yaml
index fbb50c99f..555720ade 100644
--- a/.zuul.d/centos.yaml
+++ b/.zuul.d/centos.yaml
@@ -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
@@ -64,6 +71,12 @@
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
post-run: tests/playbooks/publish.yml
@@ -73,6 +86,12 @@
- 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
nodeset: kolla-centos8
@@ -82,6 +101,12 @@
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
post-run: tests/playbooks/publish.yml
@@ -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
diff --git a/kolla/image/build.py b/kolla/image/build.py
index 5711a0f93..28318c299 100755
--- a/kolla/image/build.py
+++ b/kolla/image/build.py
@@ -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))
diff --git a/tests/playbooks/run.yml b/tests/playbooks/run.yml
index cd2f5ca8c..6ccd38f99 100644
--- a/tests/playbooks/run.yml
+++ b/tests/playbooks/run.yml
@@ -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 }}"
diff --git a/tests/test_build.py b/tests/test_build.py
index eac241265..395ceccf6 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -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):
diff --git a/tox.ini b/tox.ini
index a1c6e0c90..06679d519 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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