diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..1f6a35c86 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM r-base + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + libssl-dev \ + libcurl4-openssl-dev +RUN R -e 'install.packages("devtools", repos = "https://cran.r-project.org")' +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + libxml2-dev +RUN R -e 'devtools::install_dev_deps("rstan", repos = "https://cran.r-project.org")' +RUN R -e 'install.packages("RInside", repos = "https://cran.r-project.org")' diff --git a/Jenkinsfile b/Jenkinsfile index dbe55f0d5..107c465a6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,16 +1,6 @@ pipeline { - agent any + agent { dockerfile true } stages { - stage('Install dependencies') { - steps { - sh """ - export MAKEFLAGS=-j${env.PARALLEL} - R -e 'install.packages("devtools", repos = "https://cran.r-project.org")' - R -e 'update(devtools::package_deps("rstan"), repos = "https://cran.r-project.org")' - R -e 'install.packages("RInside", repos = "https://cran.r-project.org")' - """ - } - } stage('Build') { steps { sh """