6 amd64_dirs=${amd64_dirs-"\
15 arm64_dirs=${arm64_dirs-${amd64_dirs}}
16 build_opts=(--pull=true --no-cache --force-rm=true)
18 find . -name Dockerfile -exec sed -i -e "s|opnfv/functest-core:euphrates|${repo}/functest-core:amd64-euphrates|g" {} +
19 for dir in ${amd64_dirs}; do
20 (cd "${dir}" && docker build "${build_opts[@]}" -t "${repo}/functest-${dir##**/}:amd64-euphrates" .)
21 docker push "${repo}/functest-${dir##**/}:amd64-euphrates"
22 [ "${dir}" != "docker/core" ] && (docker rmi "${repo}/functest-${dir##**/}:amd64-euphrates" || true)
24 [ ! -z "${amd64_dirs}" ] && (docker rmi "${repo}/functest-core:amd64-euphrates" alpine:3.6 || true)
25 find . -name Dockerfile -exec git checkout {} +
27 find . -name Dockerfile -exec sed -i -e "s|alpine:3.6|multiarch/alpine:arm64-v3.6|g" {} +
28 find . -name Dockerfile -exec sed -i -e "s|opnfv/functest-core:euphrates|${repo}/functest-core:arm64-euphrates|g" {} +
29 for dir in ${arm64_dirs}; do
30 (cd "${dir}" && docker build "${build_opts[@]}" -t "${repo}/functest-${dir##**/}:arm64-euphrates" .)
31 docker push "${repo}/functest-${dir##**/}:arm64-euphrates"
32 [ "${dir}" != "docker/core" ] && (docker rmi "${repo}/functest-${dir##**/}:arm64-euphrates" || true)
34 [ ! -z "${arm64_dirs}" ] && (docker rmi "${repo}/functest-core:arm64-euphrates" multiarch/alpine:arm64-v3.6 || true)
35 find . -name Dockerfile -exec git checkout {} +