-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (33 loc) · 1.07 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
39
sudo: required
addons:
apt:
sources:
- sourceline: 'deb [arch=amd64] https://download.docker.com/linux/ubuntu trusty stable'
key_url: 'https://download.docker.com/linux/ubuntu/gpg'
packages:
- apt-transport-https
- ca-certificates
- curl
- wget
- software-properties-common
- docker-ce
services:
- docker
before_script:
- |
if [ "xfalse" == "x$TRAVIS_PULL_REQUEST" ]; then
echo "Logging in to docker hub..."
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
fi
script:
- docker build -t tanibox/build-base:bionic -f docker/build-base/bionic/Dockerfile .
- docker build -t tanibox/build-base:alpine -f docker/build-base/alpine/Dockerfile .
- docker tag tanibox/build-base:bionic tanibox/build-base:latest
after_success:
- |
if [ "xfalse" == "x$TRAVIS_PULL_REQUEST" ]; then
echo "Pushing images to docker hub..."
docker push tanibox/build-base:bionic
docker push tanibox/build-base:alpine
docker push tanibox/build-base:latest
fi