diff options
Diffstat (limited to 'build.sh')
-rw-r--r-- | build.sh | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -8,8 +8,7 @@ docker/core \ docker/healthcheck \ docker/smoke \ docker/cnf \ -docker/security \ -docker/features"} +docker/security"} arm64_dirs=${arm64_dirs-${amd64_dirs}} build_opts=(--pull=true --no-cache --force-rm=true) @@ -55,4 +54,25 @@ done arm64v8/golang:1.11-alpine3.9 || 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-hunter|g" {} + +find . -name Dockerfile -exec sed -i \ + -e "s|opnfv/functest-kubernetes-healthcheck|\ +${repo}/functest-kubernetes-healthcheck:arm-hunter|g" {} + +for dir in ${arm_dirs}; do + (cd "${dir}" && docker build "${build_opts[@]}" \ + -t "${repo}/functest-kubernetes-${dir##**/}:arm-hunter" .) + docker push "${repo}/functest-kubernetes-${dir##**/}:arm-hunter" + [ "${dir}" != "docker/core" ] && + (docker rmi \ + "${repo}/functest-kubernetes-${dir##**/}:arm-hunter" || true) +done +[ ! -z "${arm_dirs}" ] && + (docker rmi "${repo}/functest-kubernetes-core:arm-hunter" \ + arm32v7/golang:1.14-alpine3.12 || true) +find . -name Dockerfile -exec git checkout {} + + exit $? |