forked from edv/docker-spotweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
34 lines (26 loc) · 922 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
os: linux
dist: trusty
services:
- docker
language: shell
branches:
only:
- master
script:
# Build X86 docker image
- docker build -f ./x86/Dockerfile -t solidrhino/spotweb .
# Build ARM docker image
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
- docker build -f ./arm/Dockerfile -t solidrhino/rpi-spotweb .
after_success:
# push image
- >
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker tag solidrhino/spotweb solidrhino/spotweb:latest
docker tag solidrhino/spotweb solidrhino/spotweb:$TRAVIS_BUILD_NUMBER
docker push solidrhino/spotweb
docker tag solidrhino/rpi-spotweb solidrhino/rpi-spotweb:latest
docker tag solidrhino/rpi-spotweb solidrhino/rpi-spotweb:$TRAVIS_BUILD_NUMBER
docker push solidrhino/rpi-spotweb
fi