This repository has been archived by the owner on Dec 8, 2018. It is now read-only.
forked from mariusmotea/diyHue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
38 lines (34 loc) · 1.39 KB
/
.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
35
36
37
38
sudo: required
services:
- docker
language: bash
env:
- ARCH=amd64
- ARCH=arm
script:
- docker run --rm --privileged multiarch/qemu-user-static:register
- docker build -t diyhue/core:$ARCH -f ./.build/$ARCH.Dockerfile .
# test image
- docker run -d --name "diyHue" --network="host" -v '/mnt/hue-emulator/export/':'/opt/hue-emulator/export/':'rw' -e 'MAC=b8:27:eb:d4:dc:11' -e 'IP=192.168.1.123' diyhue/core:$ARCH
- sleep 10
- docker logs diyHue
- docker kill diyHue
- docker rm diyHue
after_success:
# Tag and push built images
- >
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker login -u="$DOCKER_USER" -p="$DOCKER_PASS"
docker tag diyhue/core:$ARCH diyhue/core:$ARCH-$TRAVIS_COMMIT
docker push diyhue/core:$ARCH
docker push diyhue/core:$ARCH-$TRAVIS_COMMIT
# Download manifest-tool
wget https://github.com/estesp/manifest-tool/releases/download/v0.7.0/manifest-tool-linux-amd64
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
# Push manifest-list
./manifest-tool push from-args --platforms linux/amd64,linux/arm --template "diyhue/core:ARCH-${TRAVIS_COMMIT}" --target "diyhue/core:$TRAVIS_COMMIT"
./manifest-tool push from-args --platforms linux/amd64,linux/arm --template "diyhue/core:ARCH-${TRAVIS_COMMIT}" --target "diyhue/core:latest"
fi
notifications:
slack: diyhue:84x97ehqLW4B6pe9ntP16SOI