Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ffaerber committed Nov 22, 2017
1 parent f2599da commit e500379
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ services:

env:
matrix:
- ARCH=arm BASE_IMAGE=hypriot/rpi-node:8.1-slim
# - ARCH=amd64 BASE_IMAGE=amd64/debian:stretch-slim
- ARCH=arm BASE_IMAGE=arm32v7/debian:jessie-slim
# - ARCH=amd64 BASE_IMAGE=amd64/debian:jessie-slim


script:
Expand Down
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ FROM ${BASE_IMAGE}

COPY qemu-arm-static /usr/bin/qemu-arm-static

RUN apt-get update && \
apt-get install -y \
vim \
gnupg \
curl

RUN curl -sL https://deb.nodesource.com/setup_9.x | sh
RUN apt-get install -y nodejs

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

Expand Down
66 changes: 33 additions & 33 deletions travis-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,36 @@ image="ffaerber/appsample"
docker tag appsample "$image:linux-$ARCH-$TRAVIS_TAG"
docker push "$image:linux-$ARCH-$TRAVIS_TAG"

if [ "$ARCH" == "amd64" ]; then
set +e
echo "Waiting for other images $image:linux-arm-$TRAVIS_TAG"
until docker run --rm stefanscherer/winspector "$image:linux-arm-$TRAVIS_TAG"
do
sleep 15
echo "Try again"
done
until docker run --rm stefanscherer/winspector "$image:linux-arm64-$TRAVIS_TAG"
do
sleep 15
echo "Try again"
done
set -e

echo "Downloading manifest-tool"
wget https://github.com/estesp/manifest-tool/releases/download/v0.5.0/manifest-tool-linux-amd64
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
./manifest-tool

echo "Pushing manifest $image:$TRAVIS_TAG"
./manifest-tool push from-args \
--platforms linux/amd64,linux/arm,linux/arm64 \
--template "$image:OS-ARCH-$TRAVIS_TAG" \
--target "$image:$TRAVIS_TAG"

echo "Pushing manifest $image:latest"
./manifest-tool push from-args \
--platforms linux/amd64,linux/arm,linux/arm64 \
--template "$image:OS-ARCH-$TRAVIS_TAG" \
--target "$image:latest"
fi
# if [ "$ARCH" == "amd64" ]; then
# set +e
# echo "Waiting for other images $image:linux-arm-$TRAVIS_TAG"
# until docker run --rm stefanscherer/winspector "$image:linux-arm-$TRAVIS_TAG"
# do
# sleep 15
# echo "Try again"
# done
# until docker run --rm stefanscherer/winspector "$image:linux-arm64-$TRAVIS_TAG"
# do
# sleep 15
# echo "Try again"
# done
# set -e
#
# echo "Downloading manifest-tool"
# wget https://github.com/estesp/manifest-tool/releases/download/v0.5.0/manifest-tool-linux-amd64
# mv manifest-tool-linux-amd64 manifest-tool
# chmod +x manifest-tool
# ./manifest-tool
#
# echo "Pushing manifest $image:$TRAVIS_TAG"
# ./manifest-tool push from-args \
# --platforms linux/amd64,linux/arm,linux/arm64 \
# --template "$image:OS-ARCH-$TRAVIS_TAG" \
# --target "$image:$TRAVIS_TAG"
#
# echo "Pushing manifest $image:latest"
# ./manifest-tool push from-args \
# --platforms linux/amd64,linux/arm,linux/arm64 \
# --template "$image:OS-ARCH-$TRAVIS_TAG" \
# --target "$image:latest"
# fi

0 comments on commit e500379

Please sign in to comment.