diff --git a/tools/jenkins/README.md b/tools/jenkins/README.md new file mode 100644 index 00000000000..8e06b68466c --- /dev/null +++ b/tools/jenkins/README.md @@ -0,0 +1 @@ +Scripts invoked by Jenkins (our CI platform) to run gRPC test suites. diff --git a/tools/jenkins/run_fuzzer.sh b/tools/jenkins/run_fuzzer.sh index 3f25a93319d..cfa7acefab9 100755 --- a/tools/jenkins/run_fuzzer.sh +++ b/tools/jenkins/run_fuzzer.sh @@ -33,14 +33,14 @@ set -ex export RUN_COMMAND="tools/fuzzer/build_and_run_fuzzer.sh $1" -export DOCKER_RUN_SCRIPT=tools/jenkins/docker_run.sh +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/jenkins/build_and_run_docker.sh \ +tools/run_tests/dockerize/build_and_run_docker.sh \ -e RUN_COMMAND="$RUN_COMMAND" \ -e OUTPUT_DIR="$OUTPUT_DIR" \ -e config="$config" \ diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py index e61c46d8b5a..3e08c1d62b3 100644 --- a/tools/run_tests/artifact_targets.py +++ b/tools/run_tests/artifact_targets.py @@ -43,10 +43,10 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, for k,v in environ.iteritems(): docker_args += ['-e', '%s=%s' % (k, v)] docker_env = {'DOCKERFILE_DIR': dockerfile_dir, - 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh', + 'DOCKER_RUN_SCRIPT': 'tools/run_tests/dockerize/docker_run.sh', 'OUTPUT_DIR': 'artifacts'} jobspec = jobset.JobSpec( - cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, + cmdline=['tools/run_tests/dockerize/build_and_run_docker.sh'] + docker_args, environ=docker_env, shortname='build_artifact.%s' % (name), timeout_seconds=30*60, diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index 34cc1cd7101..ae918be21d2 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -44,9 +44,9 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, for k,v in environ.iteritems(): docker_args += ['-e', '%s=%s' % (k, v)] docker_env = {'DOCKERFILE_DIR': dockerfile_dir, - 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh'} + 'DOCKER_RUN_SCRIPT': 'tools/run_tests/dockerize/docker_run.sh'} jobspec = jobset.JobSpec( - cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, + cmdline=['tools/run_tests/dockerize/build_and_run_docker.sh'] + docker_args, environ=docker_env, shortname='distribtest.%s' % (name), timeout_seconds=30*60, diff --git a/tools/jenkins/build_and_run_docker.sh b/tools/run_tests/dockerize/build_and_run_docker.sh similarity index 99% rename from tools/jenkins/build_and_run_docker.sh rename to tools/run_tests/dockerize/build_and_run_docker.sh index 92dbbc6f380..1ef34b2f960 100755 --- a/tools/jenkins/build_and_run_docker.sh +++ b/tools/run_tests/dockerize/build_and_run_docker.sh @@ -33,7 +33,7 @@ set -ex -cd $(dirname $0)/../.. +cd $(dirname $0)/../../.. git_root=$(pwd) cd - diff --git a/tools/jenkins/build_docker_and_run_tests.sh b/tools/run_tests/dockerize/build_docker_and_run_tests.sh similarity index 99% rename from tools/jenkins/build_docker_and_run_tests.sh rename to tools/run_tests/dockerize/build_docker_and_run_tests.sh index 5779e63db97..c2ea6f2c6eb 100755 --- a/tools/jenkins/build_docker_and_run_tests.sh +++ b/tools/run_tests/dockerize/build_docker_and_run_tests.sh @@ -33,7 +33,7 @@ set -ex -cd $(dirname $0)/../.. +cd $(dirname $0)/../../.. git_root=$(pwd) cd - diff --git a/tools/jenkins/build_interop_image.sh b/tools/run_tests/dockerize/build_interop_image.sh similarity index 99% rename from tools/jenkins/build_interop_image.sh rename to tools/run_tests/dockerize/build_interop_image.sh index d2ba97c3de8..48a216a124b 100755 --- a/tools/jenkins/build_interop_image.sh +++ b/tools/run_tests/dockerize/build_interop_image.sh @@ -40,7 +40,7 @@ set -x # BUILD_INTEROP_DOCKER_EXTRA_ARGS - optional args to be passed to the # docker run command -cd `dirname $0`/../.. +cd `dirname $0`/../../.. GRPC_ROOT=`pwd` MOUNT_ARGS="-v $GRPC_ROOT:/var/local/jenkins/grpc:ro" diff --git a/tools/jenkins/build_interop_stress_image.sh b/tools/run_tests/dockerize/build_interop_stress_image.sh similarity index 99% rename from tools/jenkins/build_interop_stress_image.sh rename to tools/run_tests/dockerize/build_interop_stress_image.sh index 31ffa752ab5..4407c8da90c 100755 --- a/tools/jenkins/build_interop_stress_image.sh +++ b/tools/run_tests/dockerize/build_interop_stress_image.sh @@ -44,7 +44,7 @@ set -x # BUILD_INTEROP_DOCKER_EXTRA_ARGS - optional args to be passed to the # docker run command -cd `dirname $0`/../.. +cd `dirname $0`/../../.. GRPC_ROOT=`pwd` MOUNT_ARGS="-v $GRPC_ROOT:/var/local/jenkins/grpc:ro" diff --git a/tools/jenkins/docker_run.sh b/tools/run_tests/dockerize/docker_run.sh similarity index 100% rename from tools/jenkins/docker_run.sh rename to tools/run_tests/dockerize/docker_run.sh diff --git a/tools/jenkins/docker_run_tests.sh b/tools/run_tests/dockerize/docker_run_tests.sh similarity index 100% rename from tools/jenkins/docker_run_tests.sh rename to tools/run_tests/dockerize/docker_run_tests.sh diff --git a/tools/run_tests/package_targets.py b/tools/run_tests/package_targets.py index 87bc4865ce3..820b539b59f 100644 --- a/tools/run_tests/package_targets.py +++ b/tools/run_tests/package_targets.py @@ -42,10 +42,10 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, for k,v in environ.iteritems(): docker_args += ['-e', '%s=%s' % (k, v)] docker_env = {'DOCKERFILE_DIR': dockerfile_dir, - 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh', + 'DOCKER_RUN_SCRIPT': 'tools/run_tests/dockerize/docker_run.sh', 'OUTPUT_DIR': 'artifacts'} jobspec = jobset.JobSpec( - cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, + cmdline=['tools/run_tests/dockerize/build_and_run_docker.sh'] + docker_args, environ=docker_env, shortname='build_package.%s' % (name), timeout_seconds=30*60, diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 758be9304d6..e813473421d 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -542,7 +542,7 @@ def build_interop_image_jobspec(language, tag=None): env['BUILD_INTEROP_DOCKER_EXTRA_ARGS'] = \ '-v %s:/root/.composer/auth.json:ro' % host_file build_job = jobset.JobSpec( - cmdline=['tools/jenkins/build_interop_image.sh'], + cmdline=['tools/run_tests/dockerize/build_interop_image.sh'], environ=env, shortname='build_docker_%s' % (language), timeout_seconds=30*60) diff --git a/tools/run_tests/run_stress_tests.py b/tools/run_tests/run_stress_tests.py index 0ba8f51c583..e42ee24ffb0 100755 --- a/tools/run_tests/run_stress_tests.py +++ b/tools/run_tests/run_stress_tests.py @@ -195,7 +195,7 @@ def build_interop_stress_image_jobspec(language, tag=None): tag = 'grpc_interop_stress_%s:%s' % (language.safename, uuid.uuid4()) env = {'INTEROP_IMAGE': tag, 'BASE_NAME': 'grpc_interop_stress_%s' % language.safename} - build_job = jobset.JobSpec(cmdline=['tools/jenkins/build_interop_stress_image.sh'], + build_job = jobset.JobSpec(cmdline=['tools/run_tests/dockerize/build_interop_stress_image.sh'], environ=env, shortname='build_docker_%s' % (language), timeout_seconds=30 * 60) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index d50d5aac95e..37291f4d3fb 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -912,13 +912,13 @@ if args.use_docker: env = os.environ.copy() env['RUN_TESTS_COMMAND'] = run_tests_cmd env['DOCKERFILE_DIR'] = dockerfile_dir - env['DOCKER_RUN_SCRIPT'] = 'tools/jenkins/docker_run_tests.sh' + env['DOCKER_RUN_SCRIPT'] = 'tools/run_tests/dockerize/docker_run_tests.sh' if args.xml_report: env['XML_REPORT'] = args.xml_report if not args.travis: env['TTY_FLAG'] = '-t' # enables Ctrl-C when not on Jenkins. - subprocess.check_call(['tools/jenkins/build_docker_and_run_tests.sh'], + subprocess.check_call(['tools/run_tests/dockerize/build_docker_and_run_tests.sh'], shell=True, env=env) sys.exit(0) diff --git a/tools/run_tests/stress_test/configs/asan.json b/tools/run_tests/stress_test/configs/asan.json index cb9f55763b1..7ae11ccbf1e 100644 --- a/tools/run_tests/stress_test/configs/asan.json +++ b/tools/run_tests/stress_test/configs/asan.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_cxx_asan" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "asan" } diff --git a/tools/run_tests/stress_test/configs/csharp.json b/tools/run_tests/stress_test/configs/csharp.json index 306fe115c72..587e1552b9a 100644 --- a/tools/run_tests/stress_test/configs/csharp.json +++ b/tools/run_tests/stress_test/configs/csharp.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_csharp" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_csharp" } }, diff --git a/tools/run_tests/stress_test/configs/go.json b/tools/run_tests/stress_test/configs/go.json index 36b465e763e..f1b2b523d3c 100644 --- a/tools/run_tests/stress_test/configs/go.json +++ b/tools/run_tests/stress_test/configs/go.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_go" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_go" } }, diff --git a/tools/run_tests/stress_test/configs/java.json b/tools/run_tests/stress_test/configs/java.json index 275384c066d..2ce6c007804 100644 --- a/tools/run_tests/stress_test/configs/java.json +++ b/tools/run_tests/stress_test/configs/java.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_java" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_java" } }, diff --git a/tools/run_tests/stress_test/configs/node-cxx.json b/tools/run_tests/stress_test/configs/node-cxx.json index c4245bf9df2..094c1236e71 100644 --- a/tools/run_tests/stress_test/configs/node-cxx.json +++ b/tools/run_tests/stress_test/configs/node-cxx.json @@ -1,12 +1,12 @@ { "dockerImages": { "grpc_stress_cxx_opt" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "opt" }, "grpc_stress_node": { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_node" } }, diff --git a/tools/run_tests/stress_test/configs/node.json b/tools/run_tests/stress_test/configs/node.json index 7a48c56a5e2..85eb9e00031 100644 --- a/tools/run_tests/stress_test/configs/node.json +++ b/tools/run_tests/stress_test/configs/node.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_node" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_node" } }, diff --git a/tools/run_tests/stress_test/configs/opt-tsan-asan.json b/tools/run_tests/stress_test/configs/opt-tsan-asan.json index 936d15169e1..fcb3678c02f 100644 --- a/tools/run_tests/stress_test/configs/opt-tsan-asan.json +++ b/tools/run_tests/stress_test/configs/opt-tsan-asan.json @@ -1,17 +1,17 @@ { "dockerImages": { "grpc_stress_cxx_opt" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "opt" }, "grpc_stress_cxx_tsan": { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "tsan" }, "grpc_stress_cxx_asan": { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "asan" } diff --git a/tools/run_tests/stress_test/configs/opt.json b/tools/run_tests/stress_test/configs/opt.json index f45b8240487..5e0e930d453 100644 --- a/tools/run_tests/stress_test/configs/opt.json +++ b/tools/run_tests/stress_test/configs/opt.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_cxx_opt" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "opt" } diff --git a/tools/run_tests/stress_test/configs/ruby.json b/tools/run_tests/stress_test/configs/ruby.json index a323fa72b6b..7e2afcbb69e 100644 --- a/tools/run_tests/stress_test/configs/ruby.json +++ b/tools/run_tests/stress_test/configs/ruby.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_ruby" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_ruby" } }, diff --git a/tools/run_tests/stress_test/configs/tsan.json b/tools/run_tests/stress_test/configs/tsan.json index 6ef3bdf7ea7..abc759c79da 100644 --- a/tools/run_tests/stress_test/configs/tsan.json +++ b/tools/run_tests/stress_test/configs/tsan.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_cxx_tsan" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "tsan" }