forked from avast/gradle-docker-compose-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
24 lines (19 loc) · 1.05 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
language: generic
sudo: required
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.m2
before_install:
# ensure Docker 1.10.3
- curl -sSL https://get.docker.com/ | sh
- sudo apt-get -y --force-yes install docker-engine=1.10.3-0~precise
# Build image with building environment
- sudo docker build --tag=build-image .
script:
- sudo docker run -v $(pwd):/build -v $HOME/.m2:/root/.m2 -v $HOME/.gradle:/root/.gradle -v /var/run/docker.sock:/var/run/docker.sock build-image test --info
after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && test $TRAVIS_REPO_SLUG == "avast/docker-compose-gradle-plugin" && sudo docker run -v $(pwd):/build -v $HOME/.m2:/root/.m2 -v $HOME/.gradle:/root/.gradle -v /var/run/docker.sock:/var/run/docker.sock -e "BINTRAY_USER=$BINTRAY_USER" -e "BINTRAY_KEY=$BINTRAY_KEY" build-image bintrayUpload -Pversion="${TRAVIS_JOB_NUMBER}.$TRAVIS_BUILD_NUMBER" --info