aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/jenkins
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-10-07 10:54:00 -0700
committerGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-10-07 10:54:00 -0700
commit39ec1e802d92e81648373db14d667f309d3f91f1 (patch)
tree2bcb092097fc112c3116259ce0a90eab13f29b69 /tools/jenkins
parentd1da978a84ebf7e7443b694c103d71de541c9796 (diff)
parent60e5f91a39525cd10ae8fc033cb6a1aefa566984 (diff)
Merge pull request #3638 from soltanmm/pip-so-cash
Enable `pip` caching
Diffstat (limited to 'tools/jenkins')
-rwxr-xr-xtools/jenkins/build_docker_and_run_tests.sh7
-rwxr-xr-xtools/jenkins/docker_run_tests.sh4
-rw-r--r--tools/jenkins/grpc_jenkins_slave/Dockerfile5
3 files changed, 14 insertions, 2 deletions
diff --git a/tools/jenkins/build_docker_and_run_tests.sh b/tools/jenkins/build_docker_and_run_tests.sh
index 2c562e992a..8b7809f2e2 100755
--- a/tools/jenkins/build_docker_and_run_tests.sh
+++ b/tools/jenkins/build_docker_and_run_tests.sh
@@ -37,8 +37,13 @@ cd `dirname $0`/../..
git_root=`pwd`
cd -
+# Ensure existence of ccache directory
mkdir -p /tmp/ccache
+# Ensure existence of the home directory for XDG caches (e.g. what pip uses for
+# its cache location now that --download-cache is deprecated).
+mkdir -p /tmp/xdg-cache-home
+
# Create a local branch so the child Docker script won't complain
git branch -f jenkins-docker
@@ -57,9 +62,11 @@ docker run \
-e "config=$config" \
-e "arch=$arch" \
-e CCACHE_DIR=/tmp/ccache \
+ -e XDG_CACHE_HOME=/tmp/xdg-cache-home \
-i $TTY_FLAG \
-v "$git_root:/var/local/jenkins/grpc" \
-v /tmp/ccache:/tmp/ccache \
+ -v /tmp/xdg-cache-home:/tmp/xdg-cache-home \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(which docker):/bin/docker \
-w /var/local/git/grpc \
diff --git a/tools/jenkins/docker_run_tests.sh b/tools/jenkins/docker_run_tests.sh
index 2e39bc6f51..8bafeea620 100755
--- a/tools/jenkins/docker_run_tests.sh
+++ b/tools/jenkins/docker_run_tests.sh
@@ -36,6 +36,10 @@ set -e
export CONFIG=$config
export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.5
+# Ensure that programs depending on current-user-ownership of cache directories
+# are satisfied (it's being mounted from outside the image).
+chown `whoami` $XDG_CACHE_HOME
+
mkdir -p /var/local/git
git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc
diff --git a/tools/jenkins/grpc_jenkins_slave/Dockerfile b/tools/jenkins/grpc_jenkins_slave/Dockerfile
index 4f5387eeb5..5f2b425c8c 100644
--- a/tools/jenkins/grpc_jenkins_slave/Dockerfile
+++ b/tools/jenkins/grpc_jenkins_slave/Dockerfile
@@ -126,10 +126,11 @@ RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
RUN apt-get update && apt-get install -y \
python-all-dev \
python3-all-dev \
- python-pip \
- python-virtualenv
+ python-pip
# Install Python packages from PyPI
+RUN pip install pip --upgrade
+RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2
# For sanity test