aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-06-09 08:22:51 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-06-12 08:44:48 -0700
commitbc17b3f0aee4b071a8bcbba90ad77764d39e80f7 (patch)
tree6af2491d389a302b802858d980df1949c419f016
parent8af419a9b2dd9fe99b86826ff5ff49f67668eb81 (diff)
fetch PR refspec for docker jenkins builds
-rwxr-xr-xtools/jenkins/run_jenkins.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/jenkins/run_jenkins.sh b/tools/jenkins/run_jenkins.sh
index a95819af60..3fa5914bc1 100755
--- a/tools/jenkins/run_jenkins.sh
+++ b/tools/jenkins/run_jenkins.sh
@@ -41,9 +41,17 @@ if [ "$platform" == "linux" ]
then
echo "building $language on Linux"
+ if [ "$ghprbPullId" != "" ]
+ then
+ # if we are building a pull request, grab corresponding refs.
+ FETCH_PULL_REQUEST_CMD="&& git fetch $GIT_URL +refs/pull/$ghprbPullId:refs/remotes/origin/pr/$ghprbPullId"
+ fi
+
# Run tests inside docker
docker run grpc/grpc_jenkins_slave bash -c -l "git clone --recursive $GIT_URL /var/local/git/grpc \
- && cd /var/local/git/grpc && git checkout -f $GIT_COMMIT \
+ && cd /var/local/git/grpc \
+ $FETCH_PULL_REQUEST_CMD \
+ && git checkout -f $GIT_COMMIT \
&& git submodule update \
&& nvm use 0.12 \
&& rvm use ruby-2.1 \