aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2020-01-03 10:48:07 +0100
committerMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2020-01-10 12:50:34 +0100
commitf2801fabdd727fc72a28b056d79787af484424a7 (patch)
tree4a9fdebf789ed1b6d76eceb3bc375187ac845705 /tests
parent8b7ec43536842dd500cc5ee1198a318070ac1046 (diff)
downloadkolla-f2801fabdd727fc72a28b056d79787af484424a7.tar.gz
kolla-f2801fabdd727fc72a28b056d79787af484424a7.zip
Add AArch64 publisher for Debian/source
This time proper approach involves job dependencies. First we build and publish x86-64 and aarch64 images with architecture name in image tag. Then we create multiarch manifests to create 'master' images. Change-Id: I6b9505dc326636fc6df8798c62c3a5eb1f728a51
Diffstat (limited to 'tests')
-rw-r--r--tests/playbooks/publish-multiarch.yml24
-rw-r--r--tests/test_build.py3
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/playbooks/publish-multiarch.yml b/tests/playbooks/publish-multiarch.yml
new file mode 100644
index 000000000..853235f6c
--- /dev/null
+++ b/tests/playbooks/publish-multiarch.yml
@@ -0,0 +1,24 @@
+---
+- hosts: all
+ tasks:
+ - name: Login to Dockerhub
+ command: "docker login -u {{ kolla_dockerhub_creds.user }} -p {{ kolla_dockerhub_creds.password }}"
+ no_log: true
+
+ - name: Ensure ~/.docker exists
+ file:
+ path: ~/.docker
+ state: directory
+ mode: 0777
+
+ - name: Enable experimental features in Docker so we can use 'docker manifest'
+ copy:
+ content: '{ "experimental": "enabled" }'
+ dest: ~/.docker/config.json
+
+ - name: Define image tag
+ set_fact:
+ image_tag: zuul.branch | regex_replace('^stable/', '')
+
+ - name: Create multiarch images
+ command: "TAG={{ image_tag }} NAMESPACE=kolla DISTRO={{ base_distro }} TYPE={{ install_type }} tools/create-multiarch-images.sh"
diff --git a/tests/test_build.py b/tests/test_build.py
index eac241265..3e0cce79a 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -23,6 +23,7 @@ import testtools
sys.path.append(
os.path.abspath(os.path.join(os.path.dirname(__file__), '../tools')))
+from kolla.common import config # noqa
from kolla.image import build # noqa
LOG = logging.getLogger(__name__)
@@ -107,5 +108,7 @@ class BuildTestDebianSource(BuildTest, base.BaseTestCase):
def setUp(self):
super(BuildTestDebianSource, self).setUp()
+ tag = '%s-%s' % (config.OPENSTACK_RELEASE['debian'], os.uname()[4])
self.build_args.extend(["--base", "debian",
+ "--tag", tag,
"--type", "source"])