diff options
author | 2016-03-11 14:47:07 -0800 | |
---|---|---|
committer | 2016-03-11 14:47:07 -0800 | |
commit | 52676ba0c250f55828f9b590c0e215ec18a9344c (patch) | |
tree | 4138d2fda2bac9430632bdb53cbd02e1366291d2 /tools/jenkins | |
parent | 4d52cca1ef29837c7610e31897240b6f4abd6991 (diff) | |
parent | aad4156a0ba79d963bfa3cd37e48a1074f956809 (diff) |
Merge pull request #5694 from nicolasnoble/pre-0.13.1-downmerge
Pre 0.13.1 downmerge
Diffstat (limited to 'tools/jenkins')
-rwxr-xr-x | tools/jenkins/build_docker_and_run_tests.sh | 11 | ||||
-rwxr-xr-x | tools/jenkins/build_interop_stress_image.sh | 3 | ||||
-rwxr-xr-x | tools/jenkins/docker_run.sh | 2 | ||||
-rwxr-xr-x | tools/jenkins/docker_run_tests.sh | 3 | ||||
-rwxr-xr-x | tools/jenkins/run_performance.sh | 5 |
5 files changed, 18 insertions, 6 deletions
diff --git a/tools/jenkins/build_docker_and_run_tests.sh b/tools/jenkins/build_docker_and_run_tests.sh index e2ac7518f0..458e8ca0c7 100755 --- a/tools/jenkins/build_docker_and_run_tests.sh +++ b/tools/jenkins/build_docker_and_run_tests.sh @@ -60,6 +60,9 @@ docker build -t $DOCKER_IMAGE_NAME $DOCKERFILE_DIR # Choose random name for docker container CONTAINER_NAME="run_tests_$(uuidgen)" +# Git root as seen by the docker instance +docker_instance_git_root=/var/local/jenkins/grpc + # Run tests inside docker docker run \ -e "RUN_TESTS_COMMAND=$RUN_TESTS_COMMAND" \ @@ -69,9 +72,10 @@ docker run \ -e XDG_CACHE_HOME=/tmp/xdg-cache-home \ -e THIS_IS_REALLY_NEEDED='see https://github.com/docker/docker/issues/14203 for why docker is awful' \ -e HOST_GIT_ROOT=$git_root \ + -e LOCAL_GIT_ROOT=$docker_instance_git_root \ -e "BUILD_ID=$BUILD_ID" \ -i $TTY_FLAG \ - -v "$git_root:/var/local/jenkins/grpc" \ + -v "$git_root:$docker_instance_git_root" \ -v /tmp/ccache:/tmp/ccache \ -v /tmp/npm-cache:/tmp/npm-cache \ -v /tmp/xdg-cache-home:/tmp/xdg-cache-home \ @@ -82,11 +86,6 @@ docker run \ $DOCKER_IMAGE_NAME \ bash -l "/var/local/jenkins/grpc/$DOCKER_RUN_SCRIPT" || DOCKER_FAILED="true" -if [ "$XML_REPORT" != "" ] -then - docker cp "$CONTAINER_NAME:/var/local/git/grpc/$XML_REPORT" $git_root || true -fi - docker cp "$CONTAINER_NAME:/var/local/git/grpc/reports.zip" $git_root || true unzip -o $git_root/reports.zip -d $git_root || true rm -f reports.zip diff --git a/tools/jenkins/build_interop_stress_image.sh b/tools/jenkins/build_interop_stress_image.sh index 92f2dab5e3..501dc5b7ca 100755 --- a/tools/jenkins/build_interop_stress_image.sh +++ b/tools/jenkins/build_interop_stress_image.sh @@ -35,6 +35,8 @@ set -x # Params: # INTEROP_IMAGE - name of tag of the final interop image +# INTEROP_IMAGE_TAG - Optional. If set, the created image will be tagged using +# the command: 'docker tag $INTEROP_IMAGE $INTEROP_IMAGE_REPOSITORY_TAG' # BASE_NAME - base name used to locate the base Dockerfile and build script # TTY_FLAG - optional -t flag to make docker allocate tty # BUILD_INTEROP_DOCKER_EXTRA_ARGS - optional args to be passed to the @@ -77,6 +79,7 @@ CONTAINER_NAME="build_${BASE_NAME}_$(uuidgen)" $BASE_IMAGE \ bash -l /var/local/jenkins/grpc/tools/dockerfile/$BASE_NAME/build_interop_stress.sh \ && docker commit $CONTAINER_NAME $INTEROP_IMAGE \ + && ( if [ -n "$INTEROP_IMAGE_REPOSITORY_TAG" ]; then docker tag -f $INTEROP_IMAGE $INTEROP_IMAGE_REPOSITORY_TAG ; fi ) \ && echo "Successfully built image $INTEROP_IMAGE") EXITCODE=$? diff --git a/tools/jenkins/docker_run.sh b/tools/jenkins/docker_run.sh index df7b6571d7..f04b1cfb55 100755 --- a/tools/jenkins/docker_run.sh +++ b/tools/jenkins/docker_run.sh @@ -42,6 +42,8 @@ else cp -r "$EXTERNAL_GIT_ROOT/$RELATIVE_COPY_PATH"/* "/var/local/git/grpc/$RELATIVE_COPY_PATH" fi +$POST_GIT_STEP + if [ -x "$(command -v rvm)" ] then rvm use ruby-2.1 diff --git a/tools/jenkins/docker_run_tests.sh b/tools/jenkins/docker_run_tests.sh index 282b857351..8d6c42cd9b 100755 --- a/tools/jenkins/docker_run_tests.sh +++ b/tools/jenkins/docker_run_tests.sh @@ -45,6 +45,8 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc mkdir -p reports +$POST_GIT_STEP + exit_code=0 $RUN_TESTS_COMMAND || exit_code=$? @@ -60,5 +62,6 @@ echo '</body></html>' >> index.html cd .. zip -r reports.zip reports +find . -name report.xml | xargs zip reports.zip exit $exit_code diff --git a/tools/jenkins/run_performance.sh b/tools/jenkins/run_performance.sh index c80685b23a..fbc078330f 100755 --- a/tools/jenkins/run_performance.sh +++ b/tools/jenkins/run_performance.sh @@ -47,6 +47,11 @@ PID1=$! bins/$config/qps_worker -driver_port 10010 & PID2=$! +# +# Put a timeout on these tests +# +((sleep 900; kill $$ && killall qps_worker && rm -f /tmp/qps-test.$$ )&) + export QPS_WORKERS="localhost:10000,localhost:10010" # big is the size in bytes of large messages (0 is the size otherwise) |