From: Cédric Ollivier Date: Fri, 12 Apr 2019 19:19:21 +0000 (+0200) Subject: Build Raspberry PI image via travis-ci X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F67549%2F1;p=functest-xtesting.git Build Raspberry PI image via travis-ci Change-Id: I91ced3f779921ed26bb91daa971692620311feaf Signed-off-by: Cédric Ollivier (cherry picked from commit 108be5e77a4832cd648474e4c3398fdaae9829ea) --- diff --git a/.travis.yml b/.travis.yml index 975152fa..8e6be446 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,10 @@ jobs: env: - REPO="${DOCKER_USERNAME}" - arch="amd64" + - script: sudo -E bash build.sh + env: + - REPO="${DOCKER_USERNAME}" + - arch="arm" - script: sudo -E bash build.sh env: - REPO="${DOCKER_USERNAME}" @@ -24,6 +28,6 @@ jobs: - stage: publish xtesting manifests script: > sudo manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ + --platforms linux/amd64,linux/arm,linux/arm64 \ --template ${DOCKER_USERNAME}/xtesting:ARCH-iruya \ --target ${DOCKER_USERNAME}/xtesting:iruya diff --git a/build.sh b/build.sh index 6b99e440..ee727fa5 100644 --- a/build.sh +++ b/build.sh @@ -11,7 +11,8 @@ repo=${REPO:-opnfv} tag=${BRANCH:-iruya} arch=${arch-"\ amd64 \ -arm64"} +arm64 \ +arm"} image="xtesting" build_opts=(--pull=true --no-cache --force-rm=true) @@ -19,6 +20,9 @@ for arch in ${arch};do if [[ ${arch} == arm64 ]]; then find . -name Dockerfile -exec sed -i \ -e "s|alpine:3.9|multiarch/alpine:arm64-v3.9|g" {} + + elif [[ ${arch} == arm ]]; then + find . -name Dockerfile -exec sed -i \ + -e "s|alpine:3.9|multiarch/alpine:armhf-v3.9|g" {} + fi (cd docker && docker build "${build_opts[@]}" \ -t "${repo}/${image}:${arch}-${tag}" .)