forked from frbncis/docker-arm32v7-omada
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
27 lines (26 loc) · 1018 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
sudo: required
services:
- docker
language: bash
script:
- |
echo "Updating Docker to have docker squash command"
curl https://get.docker.com | sh
echo "Enabling docker client experimental features"
echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
docker version
# build image
- ./build.sh . -t frnby/omada-eap-controller --squash
# push image
- >
docker login -u="$DOCKER_USER" -p="$DOCKER_PASS"
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker push frnby/omada-eap-controller:latest
elif [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker tag frnby/omada-eap-controller:latest frnby/omada-eap-controller:$TRAVIS_BRANCH
docker push frnby/omada-eap-controller:$TRAVIS_BRANCH
elif [ "$TRAVIS_BRANCH" == "develop" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker tag frnby/omada-eap-controller:latest frnby/omada-eap-controller:develop
docker push frnby/omada-eap-controller:develop
fi