From a5312c18984bbaed3d3548ba1aa0f1d4325fcd01 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 17 May 2018 06:11:31 -0700 Subject: [PATCH 1/5] delete no-longer-needed scripts from tools/jenkins --- tools/jenkins/README.md | 7 +-- tools/jenkins/build_artifacts.sh | 27 --------- tools/jenkins/build_packages.sh | 27 --------- tools/jenkins/reboot_worker.sh | 23 -------- tools/jenkins/run_distribtest.sh | 34 ----------- tools/jenkins/run_full_cloud_prod.sh | 29 ---------- tools/jenkins/run_full_performance.sh | 57 ------------------ .../jenkins/run_full_performance_released.sh | 58 ------------------- tools/jenkins/run_fuzzer.sh | 33 ----------- tools/jenkins/run_interop.sh | 24 -------- tools/jenkins/run_interop_objc.sh | 24 -------- tools/jenkins/run_jenkins.sh | 55 ------------------ tools/jenkins/run_jenkins_matrix.sh | 27 --------- tools/jenkins/run_line_count.sh | 21 ------- tools/jenkins/run_performance.sh | 26 --------- tools/jenkins/run_portability.sh | 50 ---------------- tools/jenkins/run_qps_diff.sh | 23 -------- tools/jenkins/run_sweep_performance.sh | 34 ----------- tools/jenkins/run_trickle_diff.sh | 23 -------- 19 files changed, 2 insertions(+), 600 deletions(-) delete mode 100755 tools/jenkins/build_artifacts.sh delete mode 100755 tools/jenkins/build_packages.sh delete mode 100755 tools/jenkins/reboot_worker.sh delete mode 100755 tools/jenkins/run_distribtest.sh delete mode 100755 tools/jenkins/run_full_cloud_prod.sh delete mode 100755 tools/jenkins/run_full_performance.sh delete mode 100755 tools/jenkins/run_full_performance_released.sh delete mode 100755 tools/jenkins/run_fuzzer.sh delete mode 100755 tools/jenkins/run_interop.sh delete mode 100755 tools/jenkins/run_interop_objc.sh delete mode 100755 tools/jenkins/run_jenkins.sh delete mode 100755 tools/jenkins/run_jenkins_matrix.sh delete mode 100755 tools/jenkins/run_line_count.sh delete mode 100755 tools/jenkins/run_performance.sh delete mode 100755 tools/jenkins/run_portability.sh delete mode 100755 tools/jenkins/run_qps_diff.sh delete mode 100755 tools/jenkins/run_sweep_performance.sh delete mode 100755 tools/jenkins/run_trickle_diff.sh diff --git a/tools/jenkins/README.md b/tools/jenkins/README.md index 02f63f0f4a4..1fc6de24a95 100644 --- a/tools/jenkins/README.md +++ b/tools/jenkins/README.md @@ -1,6 +1,3 @@ -# Jenkins CI scripts +# (Deprecated) Jenkins CI scripts -Scripts invoked by Jenkins (our CI platform) to run gRPC test suites. -We run a comprehensive set of tests (unit, integration, interop, -performance, portability..) on each pull request and also periodically on -`master` and release branches. +We are no longer using Jenkins to run our tests. This directory is scheduled for removal. diff --git a/tools/jenkins/build_artifacts.sh b/tools/jenkins/build_artifacts.sh deleted file mode 100755 index ed2c86adbd0..00000000000 --- a/tools/jenkins/build_artifacts.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2016 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and triggers build of artifacts. -# -# To prevent cygwin bash complaining about empty lines ending with \r -# we set the igncr option. The option doesn't exist on Linux, so we fallback -# to just 'set -ex' there. -# NOTE: No empty lines should appear in this file before igncr is set! -set -ex -o igncr || set -ex - -curr_platform="$platform" -unset platform # variable named 'platform' breaks the windows build - -python tools/run_tests/task_runner.py -f artifact $language $curr_platform $architecture diff --git a/tools/jenkins/build_packages.sh b/tools/jenkins/build_packages.sh deleted file mode 100755 index 68c5a9786c7..00000000000 --- a/tools/jenkins/build_packages.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2016 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and triggers build of artifacts. -# -# To prevent cygwin bash complaining about empty lines ending with \r -# we set the igncr option. The option doesn't exist on Linux, so we fallback -# to just 'set -ex' there. -# NOTE: No empty lines should appear in this file before igncr is set! -set -ex -o igncr || set -ex - -curr_platform="$platform" -unset platform # variable named 'platform' breaks the windows build - -python tools/run_tests/task_runner.py -f package $curr_platform diff --git a/tools/jenkins/reboot_worker.sh b/tools/jenkins/reboot_worker.sh deleted file mode 100755 index 8ca884088f4..00000000000 --- a/tools/jenkins/reboot_worker.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2016 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Reboots Jenkins worker -# -# NOTE: No empty lines should appear in this file before igncr is set! -set -ex -o igncr || set -ex - -# Give 5 seconds to finish the current job, then kill the jenkins slave process -# to avoid running any other jobs on the worker and restart the worker. -nohup sh -c 'sleep 5; killall java; sudo reboot' & diff --git a/tools/jenkins/run_distribtest.sh b/tools/jenkins/run_distribtest.sh deleted file mode 100755 index 63b485e1492..00000000000 --- a/tools/jenkins/run_distribtest.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2016 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and triggers run of distribution tests. -# -# To prevent cygwin bash complaining about empty lines ending with \r -# we set the igncr option. The option doesn't exist on Linux, so we fallback -# to just 'set -ex' there. -# NOTE: No empty lines should appear in this file before igncr is set! -set -ex -o igncr || set -ex - -curr_platform="$platform" -unset platform # variable named 'platform' breaks the windows build - -# Try collecting the artifacts to test from previous Jenkins build step -mkdir -p input_artifacts -cp -r platform=windows/artifacts/* input_artifacts || true -cp -r platform=linux/artifacts/* input_artifacts || true - -python tools/run_tests/task_runner.py -j 4 \ - -f distribtest $language $curr_platform $architecture \ - $@ diff --git a/tools/jenkins/run_full_cloud_prod.sh b/tools/jenkins/run_full_cloud_prod.sh deleted file mode 100755 index 0f1c26faa92..00000000000 --- a/tools/jenkins/run_full_cloud_prod.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2016 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and runs interop test suite. -set -ex - -export LANG=en_US.UTF-8 - -# Enter the gRPC repo root -cd $(dirname $0)/../.. - -tools/run_tests/run_interop_tests.py \ - -l all \ - --cloud_to_prod \ - --cloud_to_prod_auth \ - --prod_servers default cloud_gateway gateway_v4 cloud_gateway_v4 \ - --use_docker -t -j 12 $@ || true diff --git a/tools/jenkins/run_full_performance.sh b/tools/jenkins/run_full_performance.sh deleted file mode 100755 index 8657cc9a736..00000000000 --- a/tools/jenkins/run_full_performance.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2015 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and runs full performance test suite. -set -ex - -# Enter the gRPC repo root -cd $(dirname $0)/../.. - -# run 8core client vs 8core server -tools/run_tests/run_performance_tests.py \ - -l c++ csharp ruby java python go php7 php7_protobuf_c \ - --netperf \ - --category scalable \ - --bq_result_table performance_test.performance_experiment \ - --remote_worker_host grpc-performance-server-8core grpc-performance-client-8core grpc-performance-client2-8core \ - --xml_report report_8core.xml \ - || EXIT_CODE=1 - -# prevent pushing leftover build files to remote hosts in the next step. -git clean -fdxq --exclude='report*.xml' - -# scalability with 32cores (and upload to a different BQ table) -tools/run_tests/run_performance_tests.py \ - -l c++ java csharp go \ - --netperf \ - --category scalable \ - --bq_result_table performance_test.performance_experiment_32core \ - --remote_worker_host grpc-performance-server-32core grpc-performance-client-32core grpc-performance-client2-32core \ - --xml_report report_32core.xml \ - || EXIT_CODE=1 - -# prevent pushing leftover build files to remote hosts in the next step. -git clean -fdxq --exclude='report*.xml' - -# selected scenarios on Windows -tools/run_tests/run_performance_tests.py \ - -l csharp \ - --category scalable \ - --bq_result_table performance_test.performance_experiment_windows \ - --remote_worker_host grpc-performance-windows1 grpc-performance-windows2 \ - --xml_report report_windows.xml \ - || EXIT_CODE=1 - -exit $EXIT_CODE diff --git a/tools/jenkins/run_full_performance_released.sh b/tools/jenkins/run_full_performance_released.sh deleted file mode 100755 index 522e9e90a69..00000000000 --- a/tools/jenkins/run_full_performance_released.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# A frozen version of run_full_performance.sh that runs full performance test -# suite for the latest released stable version of gRPC. -set -ex - -# Enter the gRPC repo root -cd $(dirname $0)/../.. - -# run 8core client vs 8core server -tools/run_tests/run_performance_tests.py \ - -l c++ csharp node ruby java python go node_express \ - --netperf \ - --category scalable \ - --bq_result_table performance_released.performance_experiment \ - --remote_worker_host grpc-performance-server-8core grpc-performance-client-8core grpc-performance-client2-8core \ - --xml_report report_8core.xml \ - || EXIT_CODE=1 - -# prevent pushing leftover build files to remote hosts in the next step. -git clean -fdxq --exclude='report*.xml' - -# scalability with 32cores (and upload to a different BQ table) -tools/run_tests/run_performance_tests.py \ - -l c++ java csharp go \ - --netperf \ - --category scalable \ - --bq_result_table performance_released.performance_experiment_32core \ - --remote_worker_host grpc-performance-server-32core grpc-performance-client-32core grpc-performance-client2-32core \ - --xml_report report_32core.xml \ - || EXIT_CODE=1 - -# prevent pushing leftover build files to remote hosts in the next step. -git clean -fdxq --exclude='report*.xml' - -# selected scenarios on Windows -tools/run_tests/run_performance_tests.py \ - -l csharp \ - --category scalable \ - --bq_result_table performance_released.performance_experiment_windows \ - --remote_worker_host grpc-performance-windows1 grpc-performance-windows2 \ - --xml_report report_windows.xml \ - || EXIT_CODE=1 - -exit $EXIT_CODE diff --git a/tools/jenkins/run_fuzzer.sh b/tools/jenkins/run_fuzzer.sh deleted file mode 100755 index 92ff32b4980..00000000000 --- a/tools/jenkins/run_fuzzer.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# Copyright 2016 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Builds and runs a fuzzer (specified by the first command line argument) - -set -ex - -export RUN_COMMAND="tools/fuzzer/build_and_run_fuzzer.sh $1" -export DOCKER_RUN_SCRIPT=tools/run_tests/dockerize/docker_run.sh -export DOCKERFILE_DIR=tools/dockerfile/test/fuzzer -export OUTPUT_DIR=fuzzer_output - -runtime=${runtime:-3600} -jobs=${jobs:-3} - -tools/run_tests/dockerize/build_and_run_docker.sh \ - -e RUN_COMMAND="$RUN_COMMAND" \ - -e OUTPUT_DIR="$OUTPUT_DIR" \ - -e config="$config" \ - -e runtime="$runtime" \ - -e jobs="$jobs" diff --git a/tools/jenkins/run_interop.sh b/tools/jenkins/run_interop.sh deleted file mode 100755 index 3317b789fdc..00000000000 --- a/tools/jenkins/run_interop.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2015 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and runs interop test suite. -set -ex - -export LANG=en_US.UTF-8 - -# Enter the gRPC repo root -cd $(dirname $0)/../.. - -tools/run_tests/run_interop_tests.py -l all -s all --cloud_to_prod --cloud_to_prod_auth --use_docker --http2_interop --http2_server_interop -t -j 12 $@ || true diff --git a/tools/jenkins/run_interop_objc.sh b/tools/jenkins/run_interop_objc.sh deleted file mode 100755 index af5ad539630..00000000000 --- a/tools/jenkins/run_interop_objc.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and runs interop test suite. -set -ex - -export LANG=en_US.UTF-8 - -# Enter the gRPC repo root -cd $(dirname $0)/../.. - -tools/run_tests/run_interop_tests.py -l objc -s all --use_docker -t -j 1 $@ || true diff --git a/tools/jenkins/run_jenkins.sh b/tools/jenkins/run_jenkins.sh deleted file mode 100755 index 1578df8e3fb..00000000000 --- a/tools/jenkins/run_jenkins.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2015 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and triggers a test run based on -# env variable settings. -# -# Setting up rvm environment BEFORE we set -ex. -[[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh -# To prevent cygwin bash complaining about empty lines ending with \r -# we set the igncr option. The option doesn't exist on Linux, so we fallback -# to just 'set -ex' there. -# NOTE: No empty lines should appear in this file before igncr is set! -set -ex -o igncr || set -ex - -if [ "$platform" == "linux" ] -then - PLATFORM_SPECIFIC_ARGS="--use_docker --measure_cpu_costs" -elif [ "$platform" == "freebsd" ] -then - export MAKE=gmake -fi - -unset platform # variable named 'platform' breaks the windows build - -python tools/run_tests/run_tests.py \ - $PLATFORM_SPECIFIC_ARGS \ - -t \ - -l $language \ - -c $config \ - -x report.xml \ - -j 2 \ - $@ || TESTS_FAILED="true" - -if [ ! -e reports/index.html ] -then - mkdir -p reports - echo 'No reports generated.' > reports/index.html -fi - -if [ "$TESTS_FAILED" != "" ] -then - exit 1 -fi diff --git a/tools/jenkins/run_jenkins_matrix.sh b/tools/jenkins/run_jenkins_matrix.sh deleted file mode 100755 index f0fe00295de..00000000000 --- a/tools/jenkins/run_jenkins_matrix.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2015 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and triggers a test run, bypassing -# all args to the test script. -# -# Setting up rvm environment BEFORE we set -ex. -[[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh -# To prevent cygwin bash complaining about empty lines ending with \r -# we set the igncr option. The option doesn't exist on Linux, so we fallback -# to just 'set -ex' there. -# NOTE: No empty lines should appear in this file before igncr is set! -set -ex -o igncr || set -ex - -python tools/run_tests/run_tests_matrix.py $@ diff --git a/tools/jenkins/run_line_count.sh b/tools/jenkins/run_line_count.sh deleted file mode 100755 index 3b708c19341..00000000000 --- a/tools/jenkins/run_line_count.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and counts the number of lines in the -# project. -set -ex - -cd $(dirname $0)/../.. -tools/line_count/collect-now.sh diff --git a/tools/jenkins/run_performance.sh b/tools/jenkins/run_performance.sh deleted file mode 100755 index 3ce05cc7f1e..00000000000 --- a/tools/jenkins/run_performance.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2015 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and runs a diff on the microbenchmarks -set -ex - -# List of benchmarks that provide good signal for analyzing performance changes in pull requests -BENCHMARKS_TO_RUN="bm_fullstack_unary_ping_pong bm_fullstack_streaming_ping_pong bm_fullstack_streaming_pump bm_closure bm_cq bm_call_create bm_error bm_chttp2_hpack bm_chttp2_transport bm_pollset bm_metadata" - -# Enter the gRPC repo root -cd $(dirname $0)/../.. - -tools/run_tests/start_port_server.py -tools/profiling/microbenchmarks/bm_diff/bm_main.py -d origin/$ghprbTargetBranch -b $BENCHMARKS_TO_RUN diff --git a/tools/jenkins/run_portability.sh b/tools/jenkins/run_portability.sh deleted file mode 100755 index bb80fad68de..00000000000 --- a/tools/jenkins/run_portability.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2015 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and runs portability tests based on -# env variable setting. -# -# Setting up rvm environment BEFORE we set -ex. -[[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh -# To prevent cygwin bash complaining about empty lines ending with \r -# we set the igncr option. The option doesn't exist on Linux, so we fallback -# to just 'set -ex' there. -# NOTE: No empty lines should appear in this file before igncr is set! -set -ex -o igncr || set -ex - -echo "building $scenario" - -# If scenario has _bo suffix, add --build_only flag. -# Short suffix name had to been chosen due to path length limit on Windows. -if [ "$scenario" != "${scenario%_bo}" ] -then - scenario="${scenario%_bo}" - BUILD_ONLY_MAYBE="--build_only" -fi - -parts=($(echo $scenario | tr '_' ' ')) # split scenario into parts - -curr_platform=${parts[0]} # variable named 'platform' breaks the windows build -curr_arch=${parts[1]} -curr_compiler=${parts[2]} - -config='dbg' - -if [ "$curr_platform" == "linux" ] -then - USE_DOCKER_MAYBE="--use_docker" -fi - -python tools/run_tests/run_tests.py $USE_DOCKER_MAYBE $BUILD_ONLY_MAYBE -t -l $language -c $config --arch ${curr_arch} --compiler ${curr_compiler} -x report.xml -j 3 $@ diff --git a/tools/jenkins/run_qps_diff.sh b/tools/jenkins/run_qps_diff.sh deleted file mode 100755 index 51c1341b8bf..00000000000 --- a/tools/jenkins/run_qps_diff.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and runs a diff on the qps drivers -set -ex - -# Enter the gRPC repo root -cd $(dirname $0)/../.. - -tools/run_tests/start_port_server.py -tools/profiling/qps/qps_diff.py -d origin/$ghprbTargetBranch diff --git a/tools/jenkins/run_sweep_performance.sh b/tools/jenkins/run_sweep_performance.sh deleted file mode 100755 index 99c6266c22f..00000000000 --- a/tools/jenkins/run_sweep_performance.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2016 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and runs full performance test suite. -set -ex - -SERVER_HOST=${1:-grpc-performance-server-32core} -CLIENT_HOST1=${2:-grpc-performance-client-32core} -CLIENT_HOST2=${3:-grpc-performance-client2-32core} -# Enter the gRPC repo root -cd $(dirname $0)/../.. - -# scalability with 32cores (and upload to a different BQ table) -tools/run_tests/run_performance_tests.py \ - -l c++ \ - --category sweep \ - --bq_result_table performance_test.performance_experiment_32core \ - --remote_worker_host ${SERVER_HOST} ${CLIENT_HOST1} ${CLIENT_HOST2} \ - --perf_args "record -F 97 --call-graph dwarf" \ - || EXIT_CODE=1 - -exit $EXIT_CODE diff --git a/tools/jenkins/run_trickle_diff.sh b/tools/jenkins/run_trickle_diff.sh deleted file mode 100755 index 74f656e5ddf..00000000000 --- a/tools/jenkins/run_trickle_diff.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and runs a diff on bm_fullstack_trickle -set -ex - -# Enter the gRPC repo root -cd $(dirname $0)/../.. - -tools/run_tests/start_port_server.py -tools/profiling/microbenchmarks/bm_diff/bm_main.py -d origin/$ghprbTargetBranch -b bm_fullstack_trickle -l 4 -t cli_transport_stalls_per_iteration cli_stream_stalls_per_iteration svr_transport_stalls_per_iteration svr_stream_stalls_per_iteration --no-counters --pr_comment_name trickle From 4476d53370682117749a2cebddb45ed8ee6a5486 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 17 May 2018 06:22:41 -0700 Subject: [PATCH 2/5] move bazel_in_docker files under internal_ci/linux --- tools/internal_ci/linux/grpc_bazel_build.cfg | 2 +- .../linux/grpc_bazel_build_in_docker.sh} | 0 tools/internal_ci/linux/grpc_bazel_test.cfg | 2 +- .../linux/grpc_bazel_test_in_docker.sh} | 0 tools/jenkins/run_bazel_basic.sh | 23 ------------------- tools/jenkins/run_bazel_full.sh | 23 ------------------- 6 files changed, 2 insertions(+), 48 deletions(-) rename tools/{jenkins/run_bazel_basic_in_docker.sh => internal_ci/linux/grpc_bazel_build_in_docker.sh} (100%) rename tools/{jenkins/run_bazel_full_in_docker.sh => internal_ci/linux/grpc_bazel_test_in_docker.sh} (100%) delete mode 100755 tools/jenkins/run_bazel_basic.sh delete mode 100755 tools/jenkins/run_bazel_full.sh diff --git a/tools/internal_ci/linux/grpc_bazel_build.cfg b/tools/internal_ci/linux/grpc_bazel_build.cfg index 4d3a2ade5d2..59f5da9a678 100644 --- a/tools/internal_ci/linux/grpc_bazel_build.cfg +++ b/tools/internal_ci/linux/grpc_bazel_build.cfg @@ -19,5 +19,5 @@ build_file: "grpc/tools/internal_ci/linux/grpc_bazel.sh" timeout_mins: 60 env_vars { key: "BAZEL_SCRIPT" - value: "tools/jenkins/run_bazel_basic_in_docker.sh" + value: "tools/internal_ci/linux/grpc_bazel_build_in_docker.sh" } diff --git a/tools/jenkins/run_bazel_basic_in_docker.sh b/tools/internal_ci/linux/grpc_bazel_build_in_docker.sh similarity index 100% rename from tools/jenkins/run_bazel_basic_in_docker.sh rename to tools/internal_ci/linux/grpc_bazel_build_in_docker.sh diff --git a/tools/internal_ci/linux/grpc_bazel_test.cfg b/tools/internal_ci/linux/grpc_bazel_test.cfg index 46198b96000..6b03be9518a 100644 --- a/tools/internal_ci/linux/grpc_bazel_test.cfg +++ b/tools/internal_ci/linux/grpc_bazel_test.cfg @@ -19,5 +19,5 @@ build_file: "grpc/tools/internal_ci/linux/grpc_bazel.sh" timeout_mins: 240 env_vars { key: "BAZEL_SCRIPT" - value: "tools/jenkins/run_bazel_full_in_docker.sh" + value: "tools/internal_ci/linux/grpc_bazel_test_in_docker.sh" } diff --git a/tools/jenkins/run_bazel_full_in_docker.sh b/tools/internal_ci/linux/grpc_bazel_test_in_docker.sh similarity index 100% rename from tools/jenkins/run_bazel_full_in_docker.sh rename to tools/internal_ci/linux/grpc_bazel_test_in_docker.sh diff --git a/tools/jenkins/run_bazel_basic.sh b/tools/jenkins/run_bazel_basic.sh deleted file mode 100755 index 65a485abfbd..00000000000 --- a/tools/jenkins/run_bazel_basic.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Test basic Bazel features -# -# NOTE: No empty lines should appear in this file before igncr is set! -set -ex -o igncr || set -ex - -export DOCKERFILE_DIR=tools/dockerfile/test/bazel -export DOCKER_RUN_SCRIPT=tools/jenkins/run_bazel_basic_in_docker.sh -exec tools/run_tests/dockerize/build_and_run_docker.sh diff --git a/tools/jenkins/run_bazel_full.sh b/tools/jenkins/run_bazel_full.sh deleted file mode 100755 index 3436a8f8b69..00000000000 --- a/tools/jenkins/run_bazel_full.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Test full Bazel -# -# NOTE: No empty lines should appear in this file before igncr is set! -set -ex -o igncr || set -ex - -export DOCKERFILE_DIR=tools/dockerfile/test/bazel -export DOCKER_RUN_SCRIPT=tools/jenkins/run_bazel_full_in_docker.sh -exec tools/run_tests/dockerize/build_and_run_docker.sh From c091046b10e018586fdb87360b9e045ac6be34e8 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 17 May 2018 06:34:21 -0700 Subject: [PATCH 3/5] cleanup in run_c_cpp_test.sh --- tools/internal_ci/linux/grpc_microbenchmark_diff.sh | 4 ++-- tools/internal_ci/linux/grpc_trickle_diff.sh | 2 +- .../linux/run_if_c_cpp_modified.sh} | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) rename tools/{jenkins/run_c_cpp_test.sh => internal_ci/linux/run_if_c_cpp_modified.sh} (85%) diff --git a/tools/internal_ci/linux/grpc_microbenchmark_diff.sh b/tools/internal_ci/linux/grpc_microbenchmark_diff.sh index 45add1b02da..9834aaa0534 100755 --- a/tools/internal_ci/linux/grpc_microbenchmark_diff.sh +++ b/tools/internal_ci/linux/grpc_microbenchmark_diff.sh @@ -25,9 +25,9 @@ cd $(dirname $0)/../../.. source tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc tools/run_tests/start_port_server.py -tools/jenkins/run_c_cpp_test.sh tools/profiling/bloat/bloat_diff.py \ +tools/internal_ci/linux/run_if_c_cpp_modified.sh tools/profiling/bloat/bloat_diff.py \ -d origin/$ghprbTargetBranch || FAILED="true" -tools/jenkins/run_c_cpp_test.sh tools/profiling/microbenchmarks/bm_diff/bm_main.py \ +tools/internal_ci/linux/run_if_c_cpp_modified.sh tools/profiling/microbenchmarks/bm_diff/bm_main.py \ -d origin/$ghprbTargetBranch \ -b $BENCHMARKS_TO_RUN || FAILED="true" diff --git a/tools/internal_ci/linux/grpc_trickle_diff.sh b/tools/internal_ci/linux/grpc_trickle_diff.sh index 624031afa78..4ed1b73f9e8 100755 --- a/tools/internal_ci/linux/grpc_trickle_diff.sh +++ b/tools/internal_ci/linux/grpc_trickle_diff.sh @@ -25,7 +25,7 @@ cd $(dirname $0)/../../.. source tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc tools/run_tests/start_port_server.py -tools/jenkins/run_c_cpp_test.sh tools/profiling/microbenchmarks/bm_diff/bm_main.py \ +tools/internal_ci/linux/run_if_c_cpp_modified.sh tools/profiling/microbenchmarks/bm_diff/bm_main.py \ -d origin/$ghprbTargetBranch \ -b bm_fullstack_trickle \ -l 4 \ diff --git a/tools/jenkins/run_c_cpp_test.sh b/tools/internal_ci/linux/run_if_c_cpp_modified.sh similarity index 85% rename from tools/jenkins/run_c_cpp_test.sh rename to tools/internal_ci/linux/run_if_c_cpp_modified.sh index 4798cfee82b..736d7594234 100755 --- a/tools/jenkins/run_c_cpp_test.sh +++ b/tools/internal_ci/linux/run_if_c_cpp_modified.sh @@ -13,13 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# This script is invoked by a Jenkins pull request job and executes all +# This script is invoked by a pull request job and executes all # args passed to this script if the pull request affect C/C++ code set -ex # Enter the gRPC repo root -cd $(dirname $0)/../.. +cd $(dirname $0)/../../.. +# TODO(jtattermusch): the "ghprbTargetBranch" is Jenkins specific and probably +# does not work on kokoro? AFFECTS_C_CPP=`python -c 'import os; \ import sys; \ sys.path.insert(0, "tools/run_tests/python_utils"); \ From 2c773d4c67d27d891e965f5bb46b2d897e8333ae Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 17 May 2018 06:40:27 -0700 Subject: [PATCH 4/5] cleanup run_preformance_* scripts --- .../linux/grpc_performance_profile_master.sh | 2 +- .../linux}/run_performance_profile_daily.sh | 2 +- .../linux}/run_performance_profile_hourly.sh | 2 +- tools/jenkins/run_performance_flamegraphs.sh | 41 ------------------- 4 files changed, 3 insertions(+), 44 deletions(-) rename tools/{jenkins => internal_ci/linux}/run_performance_profile_daily.sh (98%) rename tools/{jenkins => internal_ci/linux}/run_performance_profile_hourly.sh (97%) delete mode 100755 tools/jenkins/run_performance_flamegraphs.sh diff --git a/tools/internal_ci/linux/grpc_performance_profile_master.sh b/tools/internal_ci/linux/grpc_performance_profile_master.sh index 40bbfe89dc2..fbff17466bb 100755 --- a/tools/internal_ci/linux/grpc_performance_profile_master.sh +++ b/tools/internal_ci/linux/grpc_performance_profile_master.sh @@ -20,7 +20,7 @@ cd $(dirname $0)/../../.. source tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc -tools/jenkins/run_performance_profile_hourly.sh || FAILED="true" +tools/internal_ci/linux/run_performance_profile_hourly.sh || FAILED="true" # kill port_server.py to prevent the build from hanging ps aux | grep port_server\\.py | awk '{print $2}' | xargs kill -9 diff --git a/tools/jenkins/run_performance_profile_daily.sh b/tools/internal_ci/linux/run_performance_profile_daily.sh similarity index 98% rename from tools/jenkins/run_performance_profile_daily.sh rename to tools/internal_ci/linux/run_performance_profile_daily.sh index 48d82a9b7f6..45c7a99805c 100755 --- a/tools/jenkins/run_performance_profile_daily.sh +++ b/tools/internal_ci/linux/run_performance_profile_daily.sh @@ -15,7 +15,7 @@ set -ex -cd $(dirname $0)/../.. +cd $(dirname $0)/../../.. # try to use pypy for generating reports # each trace dumps 7-8gig of text to disk, and processing this into a report is diff --git a/tools/jenkins/run_performance_profile_hourly.sh b/tools/internal_ci/linux/run_performance_profile_hourly.sh similarity index 97% rename from tools/jenkins/run_performance_profile_hourly.sh rename to tools/internal_ci/linux/run_performance_profile_hourly.sh index 9eb89571d60..edf85c2e2c1 100755 --- a/tools/jenkins/run_performance_profile_hourly.sh +++ b/tools/internal_ci/linux/run_performance_profile_hourly.sh @@ -15,7 +15,7 @@ set -ex -cd $(dirname $0)/../.. +cd $(dirname $0)/../../.. ./tools/run_tests/start_port_server.py || true diff --git a/tools/jenkins/run_performance_flamegraphs.sh b/tools/jenkins/run_performance_flamegraphs.sh deleted file mode 100755 index 5455fc9dd25..00000000000 --- a/tools/jenkins/run_performance_flamegraphs.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2015 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script is invoked by Jenkins and runs full performance test suite. -set -ex - -# Enter the gRPC repo root -cd $(dirname $0)/../.. - -# scalability with 32cores c++ benchmarks -tools/run_tests/run_performance_tests.py \ - -l c++ \ - --category scalable \ - --remote_worker_host grpc-performance-server-32core grpc-performance-client-32core grpc-performance-client2-32core \ - --perf_args "record -F 97 --call-graph dwarf" \ - --flame_graph_reports cpp_flamegraphs \ - || EXIT_CODE=1 - -# scalability with 32cores go benchmarks -tools/run_tests/run_performance_tests.py \ - -l go \ - --category scalable \ - --remote_worker_host grpc-performance-server-32core grpc-performance-client-32core grpc-performance-client2-32core \ - --perf_args "record -F 97 -g" \ - --flame_graph_reports go_flamegraphs \ - || EXIT_CODE=1 - -exit $EXIT_CODE - From b4a103e5becddfd370a3d4a424f72db4ff15d4b8 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 17 May 2018 06:41:09 -0700 Subject: [PATCH 5/5] delete the tools/jenkins directory --- tools/jenkins/README.md | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 tools/jenkins/README.md diff --git a/tools/jenkins/README.md b/tools/jenkins/README.md deleted file mode 100644 index 1fc6de24a95..00000000000 --- a/tools/jenkins/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# (Deprecated) Jenkins CI scripts - -We are no longer using Jenkins to run our tests. This directory is scheduled for removal.