From 28c06d85201c8b6a68075e1d034fddc6d0644d79 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 9 Oct 2015 16:07:36 -0700 Subject: [PATCH] Added persistent caching for npm dependencies in Jenkins Dockerfiles --- tools/jenkins/build_docker_and_run_tests.sh | 1 + tools/jenkins/grpc_jenkins_slave/Dockerfile | 2 +- tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/jenkins/build_docker_and_run_tests.sh b/tools/jenkins/build_docker_and_run_tests.sh index 6e3166ce579..5bb2b6b1886 100755 --- a/tools/jenkins/build_docker_and_run_tests.sh +++ b/tools/jenkins/build_docker_and_run_tests.sh @@ -66,6 +66,7 @@ docker run \ -i $TTY_FLAG \ -v "$git_root:/var/local/jenkins/grpc" \ -v /tmp/ccache:/tmp/ccache \ + -v /tmp/npm-cache:/tmp/npm-cache \ -v /tmp/xdg-cache-home:/tmp/xdg-cache-home \ -v /var/run/docker.sock:/var/run/docker.sock \ -v $(which docker):/bin/docker \ diff --git a/tools/jenkins/grpc_jenkins_slave/Dockerfile b/tools/jenkins/grpc_jenkins_slave/Dockerfile index 5f2b425c8c2..44796ce4c62 100644 --- a/tools/jenkins/grpc_jenkins_slave/Dockerfile +++ b/tools/jenkins/grpc_jenkins_slave/Dockerfile @@ -101,7 +101,7 @@ ENV NUGET mono /var/local/NuGet.exe # Install nvm RUN touch .profile RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash -RUN /bin/bash -l -c "nvm install 0.12" +RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache" ################## # Ruby dependencies diff --git a/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile b/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile index 81a03990916..7179a50cc59 100644 --- a/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile +++ b/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile @@ -101,7 +101,7 @@ ENV NUGET mono /var/local/NuGet.exe # Install nvm RUN touch .profile RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash -RUN /bin/bash -l -c "nvm install 0.12" +RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache" ################## # Ruby dependencies