More cleanup of docker run machinery. (#28734)

* update copyrights as per review comments

* docker run.sh cleanup: unnecessary to set CONFIG

Originally added in as
https://github.com/grpc/grpc/pull/2225/files#diff-156ef223959550cc6280d4747c600c187f275e5bb1a8f73c297e282898bf5a60R34
and no longer needed.

* XML_REPORT env variable is not used anywhere, run_tests_cmd carries the args

* remove unnecessary POST_GIT_STEP setting

It was originally added in gcc4.4 compatibility test and gcc4.4 is no
longer supported
https://github.com/grpc/grpc/pull/5384

* more docker_run.sh cleanup
pull/28840/head
Jan Tattermusch 3 years ago committed by GitHub
parent 14169dd0c5
commit dd84445074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      tools/run_tests/dockerize/build_and_run_docker.sh
  2. 21
      tools/run_tests/dockerize/docker_run.sh

@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2015 gRPC authors.
# Copyright 2016 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -51,6 +51,8 @@ else
fi
# Git root as seen by the docker instance
# TODO(jtattermusch): rename to a more descriptive directory name
# currently that's nontrivial because the name is hardcoded in many places.
EXTERNAL_GIT_ROOT=/var/local/jenkins/grpc
# temporary directory that will be mounted to the docker container
@ -78,7 +80,6 @@ docker run \
-v "${git_root}:${EXTERNAL_GIT_ROOT}" \
-v "${TEMP_REPORT_DIR}:/var/local/report_dir" \
-v "${TEMP_OUTPUT_DIR}:/var/local/output_dir" \
-w /var/local/git/grpc \
"${DOCKER_IMAGE_NAME}" \
bash -l "/var/local/jenkins/grpc/${DOCKER_RUN_SCRIPT}" || DOCKER_EXIT_CODE=$?

@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2015 gRPC authors.
# Copyright 2016 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -18,32 +18,25 @@
set -e
# TODO(jtattermusch): added in https://github.com/grpc/grpc/pull/17303, should be removed.
export CONFIG=${config:-opt}
if [ "$RELATIVE_COPY_PATH" == "" ]
if [ "${RELATIVE_COPY_PATH}" == "" ]
then
mkdir -p /var/local/git
git clone "$EXTERNAL_GIT_ROOT" /var/local/git/grpc
git clone "${EXTERNAL_GIT_ROOT}" /var/local/git/grpc
# clone gRPC submodules, use data from locally cloned submodules where possible
# TODO: figure out a way to eliminate this following shellcheck suppressions
# shellcheck disable=SC2016,SC1004
(cd "${EXTERNAL_GIT_ROOT}" && git submodule foreach 'git clone ${EXTERNAL_GIT_ROOT}/${name} /var/local/git/grpc/${name}')
(cd /var/local/git/grpc && git submodule init)
else
mkdir -p "/var/local/git/grpc/$RELATIVE_COPY_PATH"
cp -r "$EXTERNAL_GIT_ROOT/$RELATIVE_COPY_PATH"/* "/var/local/git/grpc/$RELATIVE_COPY_PATH"
mkdir -p "/var/local/git/grpc/${RELATIVE_COPY_PATH}"
cp -r "${EXTERNAL_GIT_ROOT}/${RELATIVE_COPY_PATH}"/* "/var/local/git/grpc/${RELATIVE_COPY_PATH}"
fi
cd /var/local/git/grpc
# ensure the "reports" directory exists
mkdir -p reports
# TODO(jtattermusch): this is garbage, remove it.
$POST_GIT_STEP
# TODO(jtattermusch): is this necessary?
cd /var/local/git/grpc
exit_code=0
${DOCKER_RUN_SCRIPT_COMMAND} || exit_code=$?

Loading…
Cancel
Save