Update Xtesting to 0.98
[functest.git] / build.sh
index 547f181..033d313 100644 (file)
--- a/build.sh
+++ b/build.sh
@@ -1,49 +1,50 @@
-#!/bin/bash
+#!/bin/sh
 
 set -e
 
 repo=${REPO:-opnfv}
 amd64_dirs=${amd64_dirs-"\
 docker/core \
-docker/tempest \
 docker/healthcheck \
 docker/smoke \
 docker/benchmarking \
-docker/vnf"}
-arm_dirs=${arm_dirs-"\
-docker/core \
-docker/tempest \
-docker/healthcheck \
-docker/smoke \
-docker/benchmarking \
-docker/smoke-cntt"}
+docker/vnf \
+docker/smoke-cntt \
+docker/benchmarking-cntt"}
+arm_dirs=${arm_dirs-${amd64_dirs}}
 arm64_dirs=${arm64_dirs-${amd64_dirs}}
-build_opts=("--pull=true" --no-cache "--force-rm=true")
+build_opts="--pull=true --no-cache --force-rm=true"
 
 find . -name Dockerfile -exec sed -i \
     -e "s|opnfv/functest-core|${repo}/functest-core:amd64-latest|g" {} +
 find . -name Dockerfile -exec sed -i \
-    -e "s|opnfv/functest-tempest|${repo}/functest-tempest:amd64-latest|g" {} +
+    -e "s|opnfv/functest-smoke|${repo}/functest-smoke:amd64-latest|g" {} +
+find . -name Dockerfile -exec sed -i \
+    -e "s|opnfv/functest-benchmarking|\
+${repo}/functest-benchmarking:amd64-latest|g" {} +
 for dir in ${amd64_dirs}; do
     (cd "${dir}" &&
-        docker build "${build_opts[@]}" \
+        docker build $build_opts \
             -t "${repo}/functest-${dir##**/}:amd64-latest" .)
         docker push "${repo}/functest-${dir##**/}:amd64-latest"
     [ "${dir}" != "docker/core" ] &&
         (docker rmi "${repo}/functest-${dir##**/}:amd64-latest" || true)
 done
 [ -n "${amd64_dirs}" ] &&
-    (docker rmi "${repo}/functest-core:amd64-latest" alpine:3.10 || true)
+    (docker rmi "${repo}/functest-core:amd64-latest" alpine:3.16 || true)
 find . -name Dockerfile -exec git checkout {} +
 
 find . -name Dockerfile -exec sed -i \
-    -e "s|alpine:3.10|multiarch/alpine:arm64-v3.10|g" {} +
+    -e "s|alpine:3.16|arm64v8/alpine:3.16|g" {} +
 find . -name Dockerfile -exec sed -i \
     -e "s|opnfv/functest-core|${repo}/functest-core:arm64-latest|g" {} +
 find . -name Dockerfile -exec sed -i \
-    -e "s|opnfv/functest-tempest|${repo}/functest-tempest:arm64-latest|g" {} +
+    -e "s|opnfv/functest-smoke|${repo}/functest-smoke:arm64-latest|g" {} +
+find . -name Dockerfile -exec sed -i \
+    -e "s|opnfv/functest-benchmarking|\
+${repo}/functest-benchmarking:arm64-latest|g" {} +
 for dir in ${arm64_dirs}; do
-    (cd "${dir}" && docker build "${build_opts[@]}" \
+    (cd "${dir}" && docker build $build_opts \
         -t "${repo}/functest-${dir##**/}:arm64-latest" .)
     docker push "${repo}/functest-${dir##**/}:arm64-latest"
     [ "${dir}" != "docker/core" ] &&
@@ -51,17 +52,20 @@ for dir in ${arm64_dirs}; do
 done
 [ -n "${arm64_dirs}" ] &&
     (docker rmi "${repo}/functest-core:arm64-latest" \
-        multiarch/alpine:arm64-v3.10 || true)
+        arm64v8/alpine:3.16 || true)
 find . -name Dockerfile -exec git checkout {} +
 
 find . -name Dockerfile -exec sed -i \
-    -e "s|alpine:3.10|multiarch/alpine:armhf-v3.10|g" {} +
+    -e "s|alpine:3.16|arm32v6/alpine:3.16|g" {} +
 find . -name Dockerfile -exec sed -i \
     -e "s|opnfv/functest-core|${repo}/functest-core:arm-latest|g" {} +
 find . -name Dockerfile -exec sed -i \
-    -e "s|opnfv/functest-tempest|${repo}/functest-tempest:arm-latest|g" {} +
+    -e "s|opnfv/functest-smoke|${repo}/functest-smoke:arm-latest|g" {} +
+find . -name Dockerfile -exec sed -i \
+    -e "s|opnfv/functest-benchmarking|\
+${repo}/functest-benchmarking:arm-latest|g" {} +
 for dir in ${arm_dirs}; do
-    (cd "${dir}" && docker build "${build_opts[@]}" \
+    (cd "${dir}" && docker build $build_opts \
         -t "${repo}/functest-${dir##**/}:arm-latest" .)
     docker push "${repo}/functest-${dir##**/}:arm-latest"
     [ "${dir}" != "docker/core" ] &&
@@ -69,7 +73,7 @@ for dir in ${arm_dirs}; do
 done
 [ -n "${arm_dirs}" ] &&
     (docker rmi "${repo}/functest-core:arm-latest" \
-        multiarch/alpine:armhf-v3.10 || true)
+        arm32v6/alpine:3.16 || true)
 find . -name Dockerfile -exec git checkout {} +
 
 exit $?