-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
28 lines (22 loc) · 880 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
services:
- docker
env:
global:
- DOCKER_COMPOSE_VERSION=1.24.0
- CLIENT_IMAGE=quantasnet/defender-client
- API_IMAGE=quantasnet/defender-api
before_install:
- sudo rm /usr/local/bin/docker-compose
# Install docker-compose
install:
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- sudo mv docker-compose /usr/local/bin
- chmod +x /usr/local/bin/docker-compose
script:
- docker-compose build --no-cache
after_script:
- docker images
after_success:
- if [[ ( $TRAVIS_BRANCH == master ) && ( $TRAVIS_PULL_REQUEST == false ) ]]; then
printf "Build Success\nInitiating Docker Hub Push\n" && echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin && docker push ${CLIENT_IMAGE}:latest && docker push ${API_IMAGE}:latest;
fi