forked from benmarwick/rrtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
29 lines (24 loc) · 815 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
# Build our Docker container and R pkg on Travis
language: r
sudo: required
cache: packages
os:
- linux
- osx
env:
global:
- REPO=$DOCKER_USER/rrtools
warnings_are_errors: false
services:
- docker
after_success:
# create & run container using our dockerfile, i.e. compile pkg and render Rmd to Word doc
- docker build -t $REPO .
# push our custom docker container to docker hub, env vars stored on travis-ci.org
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- export REPO=$DOCKER_USER/rrtools
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
- docker build -f Dockerfile -t $REPO:$COMMIT .
- docker tag $REPO:$COMMIT $REPO:$TAG
- docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER
- docker push $REPO