aboutsummaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
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 c5f8eeb5..ac5acfce 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.14-alpine3.12 || 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-latest|g" {} +
+find . -name Dockerfile -exec sed -i \
+ -e "s|opnfv/functest-kubernetes-healthcheck|\
+${repo}/functest-kubernetes-healthcheck:arm-latest|g" {} +
+for dir in ${arm_dirs}; do
+ (cd "${dir}" && docker build "${build_opts[@]}" \
+ -t "${repo}/functest-kubernetes-${dir##**/}:arm-latest" .)
+ docker push "${repo}/functest-kubernetes-${dir##**/}:arm-latest"
+ [ "${dir}" != "docker/core" ] &&
+ (docker rmi \
+ "${repo}/functest-kubernetes-${dir##**/}:arm-latest" || true)
+done
+[ ! -z "${arm_dirs}" ] &&
+ (docker rmi "${repo}/functest-kubernetes-core:arm-latest" \
+ arm32v7/golang:1.14-alpine3.12 || true)
+find . -name Dockerfile -exec git checkout {} +
+
exit $?