diff options
| author | Zuul <zuul@review.opendev.org> | 2020-01-10 12:44:45 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-01-10 12:44:45 +0000 |
| commit | 178df355c23590403c0be1fb73ea0ca41aa61305 (patch) | |
| tree | 7649266b0dac5056047220ca547ae2014b227270 | |
| parent | 360d335e94246d7095672c5aa92b59afa380a059 (diff) | |
| parent | b060623b907348e518bdf1afede0b641be56c415 (diff) | |
| download | kolla-178df355c23590403c0be1fb73ea0ca41aa61305.tar.gz kolla-178df355c23590403c0be1fb73ea0ca41aa61305.zip | |
Merge "CentOS 8: Add zuul build and publish jobs"
| -rw-r--r-- | .zuul.d/centos.yaml | 31 | ||||
| -rwxr-xr-x | kolla/image/build.py | 15 | ||||
| -rw-r--r-- | tests/playbooks/run.yml | 2 | ||||
| -rw-r--r-- | tests/test_build.py | 24 | ||||
| -rw-r--r-- | tox.ini | 20 |
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): @@ -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 |
