aboutsummaryrefslogtreecommitdiff
path: root/tools/dockerfile
diff options
context:
space:
mode:
authorJan Tattermusch <jtattermusch@google.com>2023-08-16 19:00:19 +0200
committerGitHub <noreply@github.com>2023-08-16 19:00:19 +0200
commit4c3ff07dac0716e14744e96c9cd66aa1f9f3036d (patch)
tree02f5d9612d74cf22acecbb356f0d8ec39db7d9c4 /tools/dockerfile
parent8bbd11ebedc58f5670d781bbd304b75f1f53324d (diff)
downloadgrpc-grpc-4c3ff07dac0716e14744e96c9cd66aa1f9f3036d.tar.gz
[bazel] Reintroduce bazelified ruby and python tests (#34033)
Reintroduce https://github.com/grpc/grpc/pull/33959. I added a fix for the python arm64 build (which is the reason why the change has been reverted earlier).
Diffstat (limited to 'tools/dockerfile')
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_ruby.current_version2
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile3
-rw-r--r--tools/dockerfile/test/python_debian11_default_arm64.current_version2
-rw-r--r--tools/dockerfile/test/python_debian11_default_arm64/Dockerfile9
-rw-r--r--tools/dockerfile/test/python_debian11_default_x64.current_version2
-rw-r--r--tools/dockerfile/test/python_debian11_default_x64/Dockerfile3
-rw-r--r--tools/dockerfile/test/ruby_debian11_arm64.current_version2
-rw-r--r--tools/dockerfile/test/ruby_debian11_arm64/Dockerfile3
-rw-r--r--tools/dockerfile/test/ruby_debian11_x64.current_version2
-rw-r--r--tools/dockerfile/test/ruby_debian11_x64/Dockerfile10
10 files changed, 30 insertions, 8 deletions
diff --git a/tools/dockerfile/interoptest/grpc_interop_ruby.current_version b/tools/dockerfile/interoptest/grpc_interop_ruby.current_version
index d6b0402208..9f6dbb4e59 100644
--- a/tools/dockerfile/interoptest/grpc_interop_ruby.current_version
+++ b/tools/dockerfile/interoptest/grpc_interop_ruby.current_version
@@ -1 +1 @@
-us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_ruby:4abe304d586e1bc862cb85e9ac5e9c7b2f7ae73c@sha256:0de52450b29cf91365e623b020cd97722c307510ba1813bee09264e0a49acdbc \ No newline at end of file
+us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_ruby:a6f7413e822f23ea4b696afe916714ba3df5175c@sha256:596678dac1d736eae7fecd5fe718efcfd3dc637fe8adf626db86be7c7727b68b \ No newline at end of file
diff --git a/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
index afae01d7b3..be4f96fa1f 100644
--- a/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
@@ -88,7 +88,8 @@ RUN \curl -sSL https://get.rvm.io | bash -s stable
# Install Ruby 2.7
RUN apt-get update && apt-get install -y procps && apt-get clean
-RUN /bin/bash -l -c "rvm install ruby-2.7"
+# "--disable-binary" is a workaround for https://github.com/rvm/rvm/issues/4975
+RUN /bin/bash -l -c "rvm install ruby-2.7 --disable-binary"
RUN /bin/bash -l -c "rvm use --default ruby-2.7"
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
diff --git a/tools/dockerfile/test/python_debian11_default_arm64.current_version b/tools/dockerfile/test/python_debian11_default_arm64.current_version
index 9b169fc51a..b450fd099b 100644
--- a/tools/dockerfile/test/python_debian11_default_arm64.current_version
+++ b/tools/dockerfile/test/python_debian11_default_arm64.current_version
@@ -1 +1 @@
-us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_arm64:faff3d19982d4a3f479a4d9633d28028834bc4df@sha256:868cfb50e465f086b75bb65a7fab6d15b1edefabcd8c1826340acefb6ea1737f \ No newline at end of file
+us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_arm64:3d13ca7bdbe30730bd150966e4b6f8e476b6b63e@sha256:899d08818fa6d3311f473963b8c899e9036845418e184be18f30045ca996fb92 \ No newline at end of file
diff --git a/tools/dockerfile/test/python_debian11_default_arm64/Dockerfile b/tools/dockerfile/test/python_debian11_default_arm64/Dockerfile
index 977de6aa99..31c0d258b6 100644
--- a/tools/dockerfile/test/python_debian11_default_arm64/Dockerfile
+++ b/tools/dockerfile/test/python_debian11_default_arm64/Dockerfile
@@ -63,6 +63,9 @@ RUN apt-get update && apt-get install -y python3.9 python3.9-dev python3-pip
# for Python test coverage reporting
RUN python3.9 -m pip install coverage
+# six is required by the run_tests.py test harness
+RUN python3.9 -m pip install six
+
# Google Cloud Platform API libraries
# These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts)
RUN python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0
@@ -88,3 +91,9 @@ RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/downloa
&& cd ../.. \
&& rm -rf ccache-4.5.1 ccache.tar.gz
+#=================
+# Setup git to access working directory across docker boundary
+
+RUN git config --global --add safe.directory /var/local/jenkins/grpc
+RUN git config --global protocol.file.allow always
+
diff --git a/tools/dockerfile/test/python_debian11_default_x64.current_version b/tools/dockerfile/test/python_debian11_default_x64.current_version
index 4a8cfedcf8..1b90c45d7d 100644
--- a/tools/dockerfile/test/python_debian11_default_x64.current_version
+++ b/tools/dockerfile/test/python_debian11_default_x64.current_version
@@ -1 +1 @@
-us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64:31ceb004af0498642b186d28e5c6411b974c2c04@sha256:4f29e539941d22b7abb911f9b6b3101ff5c7c4fb75585bfe3b7389251ea6be1d \ No newline at end of file
+us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64:14e1a18ec5d6bb304cfed659d4b4d5360b13b52c@sha256:5e9278a10a8c338963fa258213910fc0dead6bac91110256c1a0a344e0ade58f \ No newline at end of file
diff --git a/tools/dockerfile/test/python_debian11_default_x64/Dockerfile b/tools/dockerfile/test/python_debian11_default_x64/Dockerfile
index 582c7ca2f9..c2359ff9b9 100644
--- a/tools/dockerfile/test/python_debian11_default_x64/Dockerfile
+++ b/tools/dockerfile/test/python_debian11_default_x64/Dockerfile
@@ -170,6 +170,9 @@ RUN apt-get update && apt-get install -y python3.9 python3.9-dev python3-pip
# for Python test coverage reporting
RUN python3.9 -m pip install coverage
+# six is required by the run_tests.py test harness
+RUN python3.9 -m pip install six
+
# Google Cloud Platform API libraries
# These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts)
RUN python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0
diff --git a/tools/dockerfile/test/ruby_debian11_arm64.current_version b/tools/dockerfile/test/ruby_debian11_arm64.current_version
index 986d9ffefc..50940710a9 100644
--- a/tools/dockerfile/test/ruby_debian11_arm64.current_version
+++ b/tools/dockerfile/test/ruby_debian11_arm64.current_version
@@ -1 +1 @@
-us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_arm64:215df896c707f55c3092a64afc4075c7a408b516@sha256:9503d80a40555aba4dd531b64354ad8036c6b37e162c93e7994ca23d89bc7d41 \ No newline at end of file
+us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_arm64:cb472b623590186bc1d6e996cccb6fbb094e7e3a@sha256:c4901beb737a6aed3969c7bc601cd441488e5283a6abfabb80210c1bd2f5cd19 \ No newline at end of file
diff --git a/tools/dockerfile/test/ruby_debian11_arm64/Dockerfile b/tools/dockerfile/test/ruby_debian11_arm64/Dockerfile
index 65ea471b74..0189fc2679 100644
--- a/tools/dockerfile/test/ruby_debian11_arm64/Dockerfile
+++ b/tools/dockerfile/test/ruby_debian11_arm64/Dockerfile
@@ -88,7 +88,8 @@ RUN \curl -sSL https://get.rvm.io | bash -s stable
# Install Ruby 2.7
RUN apt-get update && apt-get install -y procps && apt-get clean
-RUN /bin/bash -l -c "rvm install ruby-2.7"
+# "--disable-binary" is a workaround for https://github.com/rvm/rvm/issues/4975
+RUN /bin/bash -l -c "rvm install ruby-2.7 --disable-binary"
RUN /bin/bash -l -c "rvm use --default ruby-2.7"
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
diff --git a/tools/dockerfile/test/ruby_debian11_x64.current_version b/tools/dockerfile/test/ruby_debian11_x64.current_version
index 2f52045af7..a52d3b64be 100644
--- a/tools/dockerfile/test/ruby_debian11_x64.current_version
+++ b/tools/dockerfile/test/ruby_debian11_x64.current_version
@@ -1 +1 @@
-us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64:05ff6c04182addf087f77b2515992e98b9c7a171@sha256:3f01369c3e5707fa63007820b30461b9e32a4b729d81cb92d19669d7966a8584 \ No newline at end of file
+us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64:b697ef647022cc3a14350ded1e01a52dfd9b8cf3@sha256:f30272c98928898b42903aa1a08fb0d769c8dc7b6173231a778c8c001b904219 \ No newline at end of file
diff --git a/tools/dockerfile/test/ruby_debian11_x64/Dockerfile b/tools/dockerfile/test/ruby_debian11_x64/Dockerfile
index eab09a00f3..a354804d71 100644
--- a/tools/dockerfile/test/ruby_debian11_x64/Dockerfile
+++ b/tools/dockerfile/test/ruby_debian11_x64/Dockerfile
@@ -88,7 +88,8 @@ RUN \curl -sSL https://get.rvm.io | bash -s stable
# Install Ruby 2.7
RUN apt-get update && apt-get install -y procps && apt-get clean
-RUN /bin/bash -l -c "rvm install ruby-2.7"
+# "--disable-binary" is a workaround for https://github.com/rvm/rvm/issues/4975
+RUN /bin/bash -l -c "rvm install ruby-2.7 --disable-binary"
RUN /bin/bash -l -c "rvm use --default ruby-2.7"
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
@@ -121,6 +122,13 @@ RUN mkdir /var/local/jenkins
# Required by XDS interop test harness.
RUN python3 -m pip install virtualenv==16.7.9
+# Passwordless sudo for all users
+# Bazel docker sandbox and bazel RBE run scripts under docker
+# as a regular user, but sometimes we need to be
+# able to do something with root privileges.
+RUN apt-get update && apt-get install -y sudo && apt-get clean
+RUN echo 'ALL ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
+
# Define the default command.
CMD ["bash"]