diff options
author | Mark D. Roth <roth@google.com> | 2016-05-02 10:12:25 -0700 |
---|---|---|
committer | Mark D. Roth <roth@google.com> | 2016-05-02 10:12:25 -0700 |
commit | 586c8667eea4a8a3d83d7f5781208f98d5e4d358 (patch) | |
tree | aa43ae6884c3f7caba2f1a4449e1b53ea55ad785 /tools/jenkins | |
parent | ebbbce3e6e6f08a9d35292296cbd066b0a4c4a67 (diff) | |
parent | 6b1afe1ad9e6eda6864627f8ad1f42ee088ae4ed (diff) |
Merge branch 'master' into limit_metadata_size
Diffstat (limited to 'tools/jenkins')
-rwxr-xr-x | tools/jenkins/build_interop_image.sh | 6 | ||||
-rwxr-xr-x | tools/jenkins/run_distribution.sh | 144 | ||||
-rwxr-xr-x | tools/jenkins/run_performance.sh | 2 |
3 files changed, 4 insertions, 148 deletions
diff --git a/tools/jenkins/build_interop_image.sh b/tools/jenkins/build_interop_image.sh index 26687a5a85..d2ba97c3de 100755 --- a/tools/jenkins/build_interop_image.sh +++ b/tools/jenkins/build_interop_image.sh @@ -71,10 +71,10 @@ then fi # Use image name based on Dockerfile checksum -BASE_IMAGE=${BASE_NAME}_base:`sha1sum tools/dockerfile/$BASE_NAME/Dockerfile | cut -f1 -d\ ` +BASE_IMAGE=${BASE_NAME}_base:`sha1sum tools/dockerfile/interoptest/$BASE_NAME/Dockerfile | cut -f1 -d\ ` # Make sure base docker image has been built. Should be instantaneous if so. -docker build -t $BASE_IMAGE --force-rm=true tools/dockerfile/$BASE_NAME || exit $? +docker build -t $BASE_IMAGE --force-rm=true tools/dockerfile/interoptest/$BASE_NAME || exit $? # Create a local branch so the child Docker script won't complain git branch -f jenkins-docker @@ -92,7 +92,7 @@ CONTAINER_NAME="build_${BASE_NAME}_$(uuidgen)" -v /tmp/ccache:/tmp/ccache \ --name=$CONTAINER_NAME \ $BASE_IMAGE \ - bash -l /var/local/jenkins/grpc/tools/dockerfile/$BASE_NAME/build_interop.sh \ + bash -l /var/local/jenkins/grpc/tools/dockerfile/interoptest/$BASE_NAME/build_interop.sh \ && docker commit $CONTAINER_NAME $INTEROP_IMAGE \ && echo "Successfully built image $INTEROP_IMAGE") EXITCODE=$? diff --git a/tools/jenkins/run_distribution.sh b/tools/jenkins/run_distribution.sh deleted file mode 100755 index 306b85b045..0000000000 --- a/tools/jenkins/run_distribution.sh +++ /dev/null @@ -1,144 +0,0 @@ -#!/bin/bash -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# This script is invoked by Jenkins and triggers a test run of -# linuxbrew installation of a selected language -set -ex - -# Our homebrew installation script command, per language -# Can be used in both linux and macos -if [ "$language" == "core" ]; then - command="curl -fsSL https://goo.gl/getgrpc | bash -" -elif [[ "python nodejs ruby php" =~ "$language" ]]; then - command="curl -fsSL https://goo.gl/getgrpc | bash -s $language" -else - echo "unsupported language $language" - exit 1 -fi - -if [ "$platform" == "linux" ]; then - - if [ "$dist_channel" == "homebrew" ]; then - - sha1=$(sha1sum tools/dockerfile/grpc_linuxbrew/Dockerfile | cut -f1 -d\ ) - DOCKER_IMAGE_NAME=grpc_linuxbrew_$sha1 - - # build docker image, contains all pre-requisites - docker build -t $DOCKER_IMAGE_NAME tools/dockerfile/grpc_linuxbrew - - # run per-language homebrew installation script - docker run --rm=true $DOCKER_IMAGE_NAME bash -l \ - -c "nvm use 0.12; \ - npm set unsafe-perm true; \ - rvm use ruby-2.1; \ - $command" - - else - echo "Unsupported $platform dist_channel $dist_channel" - exit 1 - fi - -elif [ "$platform" == "macos" ]; then - - if [ "$dist_channel" == "homebrew" ]; then - - echo "Formulas installed by system-wide homebrew (before)" - brew list -l - - # Save the original PATH so that we can run the system `brew` command - # again at the end of the script - export ORIGINAL_PATH=$PATH - - # Set up temp directories for test installation of homebrew - brew_root=/tmp/homebrew-test-$language - rm -rf $brew_root - mkdir -p $brew_root - git clone https://github.com/Homebrew/homebrew.git $brew_root - - # Make sure we are operating at the right copy of temp homebrew - # installation - export PATH=$brew_root/bin:$PATH - - # Set up right environment for each language - case $language in - *python*) - rm -rf jenkins_python_venv - virtualenv jenkins_python_venv - source jenkins_python_venv/bin/activate - ;; - *nodejs*) - export PATH=$HOME/.nvm/versions/node/v0.12.7/bin:$PATH - ;; - *ruby*) - export PATH=/usr/local/rvm/rubies/ruby-2.2.1/bin:$PATH - ;; - *php*) - export CFLAGS="-Wno-parentheses-equality" - ;; - esac - - # Run our homebrew installation script - bash -c "$command" - - # Uninstall / clean up per-language modules/extensions after the test - case $language in - *python*) - deactivate - rm -rf jenkins_python_venv - ;; - *nodejs*) - npm list -g | grep grpc - npm uninstall -g grpc - ;; - *ruby*) - gem list | grep grpc - gem uninstall grpc - ;; - *php*) - rm grpc.so - ;; - esac - - # Clean up - rm -rf $brew_root - - echo "Formulas installed by system-wide homebrew (after, should be unaffected)" - export PATH=$ORIGINAL_PATH - brew list -l - - else - echo "Unsupported $platform dist_channel $dist_channel" - exit 1 - fi - -else - echo "unsupported platform $platform" - exit 1 -fi diff --git a/tools/jenkins/run_performance.sh b/tools/jenkins/run_performance.sh index 903a144215..13a332751b 100755 --- a/tools/jenkins/run_performance.sh +++ b/tools/jenkins/run_performance.sh @@ -34,4 +34,4 @@ set -ex # Enter the gRPC repo root cd $(dirname $0)/../.. -tools/run_tests/run_performance_tests.py -l c++ node ruby csharp +tools/run_tests/run_performance_tests.py -l c++ node ruby csharp python |