aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/jenkins/run_jenkins.sh
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-06-17 11:40:21 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-06-17 11:40:21 -0700
commit118e331a7f25d2752484ac306cf066c87333bdc2 (patch)
tree7c78d08e9d9212afd98fdb013a31194bb9c7aae1 /tools/jenkins/run_jenkins.sh
parent602424a0a571b40dcc312ff9ef80666bfcde8b8c (diff)
make sure docker image is up-to-date before each build
Diffstat (limited to 'tools/jenkins/run_jenkins.sh')
-rwxr-xr-xtools/jenkins/run_jenkins.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/jenkins/run_jenkins.sh b/tools/jenkins/run_jenkins.sh
index 763a930dd8..c69ce3ed46 100755
--- a/tools/jenkins/run_jenkins.sh
+++ b/tools/jenkins/run_jenkins.sh
@@ -41,6 +41,12 @@ if [ "$platform" == "linux" ]
then
echo "building $language on Linux"
+ # Use image name based on Dockerfile checksum
+ DOCKER_IMAGE_NAME=grpc_jenkins_slave_`sha1sum tools/jenkins/grpc_jenkins_slave/Dockerfile | cut -f1 -d\ `
+
+ # Make sure docker image has been built. Should be instantaneous if so.
+ docker build -t $DOCKER_IMAGE_NAME tools/jenkins/grpc_jenkins_slave
+
if [ "$ghprbPullId" != "" ]
then
# if we are building a pull request, grab corresponding refs.
@@ -51,12 +57,11 @@ then
rm -f docker.cid
# Run tests inside docker
- docker run --cidfile=docker.cid grpc/grpc_jenkins_slave bash -c -l "git clone --recursive $GIT_URL /var/local/git/grpc \
+ docker run --cidfile=docker.cid $DOCKER_IMAGE_NAME bash -c -l "git clone --recursive $GIT_URL /var/local/git/grpc \
&& cd /var/local/git/grpc \
$FETCH_PULL_REQUEST_CMD \
&& git checkout -f $GIT_COMMIT \
&& git submodule update \
- && pip install simplejson mako \
&& nvm use 0.12 \
&& rvm use ruby-2.1 \
&& CONFIG=$config tools/run_tests/prepare_travis.sh \