Patch Functest docker images for ARM
authorDelia Popescu <delia.popescu@enea.com>
Tue, 7 Nov 2017 15:18:22 +0000 (17:18 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Thu, 9 Nov 2017 04:47:00 +0000 (05:47 +0100)
A new tox env is defined to ease patching all Dockerfiles for ARM.
This env will only patch the Dockerfile related to functest-core when
the manifests are published.

Jenkins jobs can simply apply the next command:
    $ tox -e patcharm64

Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com>
Change-Id: Icf69e27c1da95a721ebf67d5ce190c9b8cefce0a
Signed-off-by: Delia Popescu <delia.popescu@enea.com>
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
tox.ini

diff --git a/tox.ini b/tox.ini
index 978b3f6..4c2303e 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -68,3 +68,11 @@ whitelist_externals =
 commands =
   bash -c "patch -f -p1 < docker/Dockerfile.aarch64.patch"
   git checkout docker/Dockerfile
+
+[testenv:patcharm64]
+basepython = python2.7
+whitelist_externals =
+  find
+commands =
+  find . -name Dockerfile -exec sed -i -e 's|alpine:3.6|multiarch/alpine:arm64-v3.6|g' \{\} +
+  find . -name Dockerfile -exec sed -i -e 's|opnfv/functest-core|opnfv/functest-core:arm64-latest|g' \{\} +