forked from herloct/docker-deployer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
38 lines (33 loc) · 1.04 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
sudo: required
dist: trusty
services:
- docker
matrix:
fast_finish: true
include:
- env:
- DEPLOYER_VERSION=6.3.0
- IS_LATEST=1
before_script:
- docker build --rm --tag herloct/deployer:$DEPLOYER_VERSION-$TRAVIS_BRANCH .
- docker run --rm herloct/deployer:$DEPLOYER_VERSION-$TRAVIS_BRANCH
- rm -rf tests
script:
- mkdir tests
- cd tests
- docker run --rm
--volume $(pwd):/project
herloct/deployer:$DEPLOYER_VERSION-$TRAVIS_BRANCH init -t Common
- ls -la .
- if [[ ! -f "deploy.php" ]]; then exit 1; fi
after_success:
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
- docker push herloct/deployer:$DEPLOYER_VERSION-$TRAVIS_BRANCH;
- if [[ $TRAVIS_TAG ]]; then
docker tag herloct/deployer:$DEPLOYER_VERSION-$TRAVIS_BRANCH herloct/deployer:$DEPLOYER_VERSION;
docker push herloct/deployer:$DEPLOYER_VERSION;
fi
- if [[ $TRAVIS_TAG ]] && [[ $IS_LATEST == 1 ]]; then
docker tag herloct/deployer:$DEPLOYER_VERSION herloct/deployer:latest;
docker push herloct/deployer:latest;
fi