-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ | |
^CONDUCT\.md$ | ||
^CONTRIBUTING\.md$ | ||
analysis | ||
^Dockerfile$ | ||
^\.travis\.yml$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Build our Docker container and R pkg on Travis | ||
|
||
env: | ||
global: | ||
- REPO=$DOCKER_USER/mininglucc | ||
|
||
sudo: required | ||
|
||
warnings_are_errors: false | ||
|
||
language: generic | ||
|
||
services: | ||
- docker | ||
|
||
before_install: | ||
# 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 | ||
after_success: | ||
- docker login -u $DOCKER_USER -p $DOCKER_PASS | ||
- export REPO=$DOCKER_USER/mininglucc | ||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# get the base image, the rocker/verse has R, RStudio and pandoc | ||
FROM rocker/geospatial:4.0.1 | ||
|
||
# required | ||
MAINTAINER Victor Maus <[email protected]> | ||
|
||
COPY . /mininglucc | ||
|
||
# go into the repo directory | ||
RUN . /etc/environment \ | ||
# Install linux depedendencies here | ||
# e.g. need this for ggforce::geom_sina | ||
&& sudo apt-get update \ | ||
&& sudo apt-get install libudunits2-dev -y \ | ||
# build this compendium package | ||
&& R -e "devtools::install('/mininglucc', dep=TRUE)" \ | ||
# render the manuscript into a docx, you'll need to edit this if you've | ||
# customised the location and name of your main Rmd file | ||
&& R -e "rmarkdown::render('/mininglucc/analysis/paper/paper.Rmd')" |