forked from snagles/docker-registry-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
27 lines (27 loc) · 932 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
language: go
sudo: required
services:
- docker
go:
- tip
before_install:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- sudo docker --version
install: true
script:
- ./.travis-test.sh
- bash <(curl -s https://codecov.io/bash)
- if [ "$TRAVIS_BRANCH" == "master" ]; then
docker build -t snagles/docker-registry-manager .;
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push snagles/docker-registry-manager;
echo "Auto-deploy successful for $TRAVIS_BRANCH";
elif [ "$TRAVIS_BRANCH" == "develop" ]; then
docker build -t snagles/docker-registry-manager:develop .;
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push snagles/docker-registry-manager:develop;
echo "Auto-deploy successful for $TRAVIS_BRANCH";
else
echo "Not auto-deploying docker image for $TRAVIS_BRANCH";
fi