[docker] Add sonobuoy multiarch image build 62/1062/3
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Tue, 25 Jun 2019 15:46:42 +0000 (17:46 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 27 Jun 2019 18:33:07 +0000 (20:33 +0200)
commit6b937d0dc0f36596c9bc1ef8766ba7363451458d
tree8880ceeb21f90366932a405c5d490333eefb510a
parentaf56fc5c4d0797e35a23dad8a00bdfe9d78e05ad
[docker] Add sonobuoy multiarch image build

Upstream sonobuoy lacks 2 images for AArch64 architecture, so build
our own multiarch amd64 (x86_64) + arm64 (AArch64) images for:
- sonobuoy-plugin-systemd-logs (tag version 'latest');
- kube-conformance (tag version 'v1.11');

The new images will be pushed to Dockerhub as:
- akraino/validation:sonobuoy-plugin-systemd-logs-latest
- akraino/validation:kube-conformance-v1.11

Since upstream Dockerfiles require small changes for AArch64 support,
implement a new patching mechanism via new make targets in
`docker/build.mk`:
- .submodules_init
  * initializes the (newly added) git submodules in this repository
    and pulls the pinned-down commit for each submodule;
- .submodules_patched
  * Applies patches found in the `patches` and/or `patches/<arch>`
    subdirectories for each submodule (using `git am -3`), so we can
    apply AArch64-specific changes only on arm64 platforms;
- .submodules_clean
  * Un-applies patches by resetting each git submodule to its
    pinned-down commit;

To add support for pre-build actions like submodules init + patching,
turn `.build` make target into a double-colon target and extend it
for the two new containers accordingly.

To prevent tox verify failures, adjust ui .eslintrc and tox.ini to
remove the git submodules first (second one being a temporary
workaround until ci-management allows configuring verify jobs with
git submodule handling disabled).

JIRA: VAL-24

Change-Id: Ibfeb3551e44e82fdade2886985ca4577b7d32522
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
12 files changed:
.gitignore
.gitmodules [new file with mode: 0644]
docker/README.rst
docker/build.mk
docker/kube-conformance/Makefile [new file with mode: 0644]
docker/kube-conformance/kube-conformance [new submodule]
docker/kube-conformance/patches/aarch64/0001-Dockerfile-Makefile-Add-AArch64-support.patch [new file with mode: 0644]
docker/sonobuoy-plugin-systemd-logs/Makefile [new file with mode: 0644]
docker/sonobuoy-plugin-systemd-logs/patches/aarch64/0001-Dockerfile-AArch64-support.patch [new file with mode: 0644]
docker/sonobuoy-plugin-systemd-logs/sonobuoy-plugin-systemd-logs [new submodule]
tox.ini
ui/src/main/webapp/.eslintrc