Build Raspberry PI image via travis-ci 49/67549/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Fri, 12 Apr 2019 19:19:21 +0000 (21:19 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Fri, 12 Apr 2019 20:26:21 +0000 (22:26 +0200)
Change-Id: I91ced3f779921ed26bb91daa971692620311feaf
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 108be5e77a4832cd648474e4c3398fdaae9829ea)

.travis.yml
build.sh

index 975152f..8e6be44 100644 (file)
@@ -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
index 6b99e44..ee727fa 100644 (file)
--- 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}" .)