From 26debdfb6add33d595bbb01b8265f45f3ee54c5d Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Ollivier?= Date: Fri, 12 Apr 2019 21:19:21 +0200 Subject: [PATCH] Build Raspberry PI image via travis-ci MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I91ced3f779921ed26bb91daa971692620311feaf Signed-off-by: Cédric Ollivier (cherry picked from commit 108be5e77a4832cd648474e4c3398fdaae9829ea) --- .travis.yml | 6 +++++- build.sh | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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}" .) -- 2.16.6