diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-04-23 23:24:26 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-04-24 14:17:00 +0200 |
commit | 4ca522bdb4918bf97c0e2ad9b1c8c281c0133ffd (patch) | |
tree | f818bb7ea127171a4a9e37d626e5403405080b62 /build.sh | |
parent | c65906e74c02805308ff99c99bc207ac424437e6 (diff) |
Check shell scripts via bashate
It also removes functest/cli/functest-complete.sh.
Change-Id: I5d9313be6a155b4adf1b82ce2b111ec06823cd8f
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 00b78ca96bef67166e0118a0dbdb5152f401a608)
Diffstat (limited to 'build.sh')
-rw-r--r-- | build.sh | 29 |
1 files changed, 20 insertions, 9 deletions
@@ -14,23 +14,34 @@ docker/parser"} arm64_dirs=${arm64_dirs-${amd64_dirs}} build_opts=(--pull=true --no-cache --force-rm=true) -find . -name Dockerfile -exec sed -i -e "s|opnfv/functest-core:fraser|${repo}/functest-core:amd64-fraser|g" {} + +find . -name Dockerfile -exec sed -i \ + -e "s|opnfv/functest-core:fraser|${repo}/functest-core:amd64-fraser|g" {} + for dir in ${amd64_dirs}; do - (cd "${dir}" && docker build "${build_opts[@]}" -t "${repo}/functest-${dir##**/}:amd64-fraser" .) + (cd "${dir}" && + docker build "${build_opts[@]}" \ + -t "${repo}/functest-${dir##**/}:amd64-fraser" .) docker push "${repo}/functest-${dir##**/}:amd64-fraser" - [ "${dir}" != "docker/core" ] && (docker rmi "${repo}/functest-${dir##**/}:amd64-fraser" || true) + [ "${dir}" != "docker/core" ] && + (docker rmi "${repo}/functest-${dir##**/}:amd64-fraser" || true) done -[ ! -z "${amd64_dirs}" ] && (docker rmi "${repo}/functest-core:amd64-fraser" alpine:3.7 || true) +[ ! -z "${amd64_dirs}" ] && + (docker rmi "${repo}/functest-core:amd64-fraser" alpine:3.7 || true) find . -name Dockerfile -exec git checkout {} + -find . -name Dockerfile -exec sed -i -e "s|alpine:3.7|multiarch/alpine:arm64-v3.7|g" {} + -find . -name Dockerfile -exec sed -i -e "s|opnfv/functest-core:fraser|${repo}/functest-core:arm64-fraser|g" {} + +find . -name Dockerfile -exec sed -i \ + -e "s|alpine:3.7|multiarch/alpine:arm64-v3.7|g" {} + +find . -name Dockerfile -exec sed -i \ + -e "s|opnfv/functest-core:fraser|${repo}/functest-core:arm64-fraser|g" {} + for dir in ${arm64_dirs}; do - (cd "${dir}" && docker build "${build_opts[@]}" -t "${repo}/functest-${dir##**/}:arm64-fraser" .) + (cd "${dir}" && docker build "${build_opts[@]}" \ + -t "${repo}/functest-${dir##**/}:arm64-fraser" .) docker push "${repo}/functest-${dir##**/}:arm64-fraser" - [ "${dir}" != "docker/core" ] && (docker rmi "${repo}/functest-${dir##**/}:arm64-fraser" || true) + [ "${dir}" != "docker/core" ] && + (docker rmi "${repo}/functest-${dir##**/}:arm64-fraser" || true) done -[ ! -z "${arm64_dirs}" ] && (docker rmi "${repo}/functest-core:arm64-fraser" multiarch/alpine:arm64-v3.7 || true) +[ ! -z "${arm64_dirs}" ] && + (docker rmi "${repo}/functest-core:arm64-fraser" \ + multiarch/alpine:arm64-v3.7 || true) find . -name Dockerfile -exec git checkout {} + exit $? |