aboutsummaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2020-08-10 21:40:11 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2020-08-11 19:44:36 +0200
commit8d1bb7152e65a967020a6b674514fd444f8007e9 (patch)
treef0afcf0515a876b4235f940b76e78a8b97edebc4 /build.sh
parent7e45062745ee2d1f634748ca4c0880f5f1ae7691 (diff)
Compile all Functest K8s containers for arm v7 and v8
It removes sudo when useless and turns debug on when compiling K8s binaries. It avoids TravisCI timeouts (No output has been received)[1] [1] https://travis-ci.org/github/collivier/functest-kubernetes/jobs/716819529 Change-Id: I4719257596bf9a6510e2f772271b336847d1ccb5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 3c4543a8ef6f84a5f25483a6dfe50e0075a9cd0e)
Diffstat (limited to 'build.sh')
-rw-r--r--build.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index 4a66ddf8..3cf78e2d 100644
--- a/build.sh
+++ b/build.sh
@@ -9,6 +9,7 @@ docker/healthcheck \
docker/smoke \
docker/cnf \
docker/security"}
+arm_dirs=${arm_dirs-${amd64_dirs}}
arm64_dirs=${arm64_dirs-${amd64_dirs}}
build_opts=(--pull=true --no-cache --force-rm=true)
@@ -54,4 +55,25 @@ done
arm64v8/golang:1.13-alpine3.11 || true)
find . -name Dockerfile -exec git checkout {} +
+find . -name Dockerfile -exec sed -i \
+ -e "s|golang:1.14-alpine3.12|arm32v7/golang:1.14-alpine3.12|g" {} +
+find . -name Dockerfile -exec sed -i \
+ -e "s|opnfv/functest-kubernetes-core|\
+${repo}/functest-kubernetes-core:arm-kali|g" {} +
+find . -name Dockerfile -exec sed -i \
+ -e "s|opnfv/functest-kubernetes-healthcheck|\
+${repo}/functest-kubernetes-healthcheck:arm-kali|g" {} +
+for dir in ${arm_dirs}; do
+ (cd "${dir}" && docker build "${build_opts[@]}" \
+ -t "${repo}/functest-kubernetes-${dir##**/}:arm-kali" .)
+ docker push "${repo}/functest-kubernetes-${dir##**/}:arm-kali"
+ [ "${dir}" != "docker/core" ] &&
+ (docker rmi \
+ "${repo}/functest-kubernetes-${dir##**/}:arm-kali" || true)
+done
+[ ! -z "${arm_dirs}" ] &&
+ (docker rmi "${repo}/functest-kubernetes-core:arm-kali" \
+ arm32v7/golang:1.14-alpine3.12 || true)
+find . -name Dockerfile -exec git checkout {} +
+
exit $?