Skip to content

Commit

Permalink
deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
ffaerber committed Nov 20, 2017
1 parent 58faccb commit d45c3cb
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ env:
- ARCH=arm32v7

script:
- chmod +x ./travis-build.sh
- ./travis-build.sh
- chmod +x ./travis-deploy.sh
- ./travis-deploy.sh
18 changes: 0 additions & 18 deletions travis-build.sh

This file was deleted.

27 changes: 27 additions & 0 deletions travis-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
set -e
if [ "$TRAVIS_BRANCH" == "master" && $TRAVIS_TAG ]; then
docker version
uname -a
echo "Updating Docker engine to latest version"
sudo service docker stop
curl -fsSL https://get.docker.com/ | sudo sh
docker version

docker login -u="$DOCKER_USER" -p="$DOCKER_PASS"

docker run --rm --privileged multiarch/qemu-user-static:register --reset
mkdir tmp
pushd tmp &&
curl -L -o qemu-arm-static.tar.gz https://github.com/multiarch/qemu-user-static/releases/download/v2.6.0/qemu-arm-static.tar.gz &&
tar xzf qemu-arm-static.tar.gz &&
popd

docker build -t ffaerber/appsample:build --build-arg ARCH=$ARCH . --no-cache
docker run ffaerber/appsample:build uname -a

docker tag ffaerber/appsample:build ffaerber/appsample:$TRAVIS_TAG
docker tag ffaerber/appsample:build ffaerber/appsample:latest
docker push ffaerber/appsample:$TRAVIS_TAG
docker push ffaerber/appsample:latest
fi

0 comments on commit d45c3cb

Please sign in to comment.