-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
41 lines (32 loc) · 884 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
29
30
31
32
33
34
35
36
37
38
39
40
41
language: python
services:
- docker
env:
global:
- COMPOSE_VERSION=1.16.1
- TAG=$(git rev-parse --short HEAD)
before_install:
- curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
before_script:
- docker build --cache-from ${REPO} -t $REPO:${TAG} .
- docker tag ${REPO}:${TAG} $REPO:latest
install: true
script:
- echo "test should run here"
before_deploy:
- docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
deploy:
# upload image tagged latest
- provider: script
script: docker push ${REPO}:latest
on:
branch: master
# upload image tagged with github short hash
- provider: script
script: docker push ${REPO}:${TAG}
on:
branch: develop
notifications:
email: false