Skip to content

Commit

Permalink
[CI] Upgraded the docker images for Ruby Distrib Tests (grpc#35911)
Browse files Browse the repository at this point in the history
- Dropped Ruby 2.7 test (Ruby 2.7 hit EOL 1 year ago)
- Upgraded the base image of Ruby docker images from Debian:10 to Debian:11 (Debian:10 hit EOL)

Closes grpc#35911

PiperOrigin-RevId: 607088383
  • Loading branch information
veblush authored and copybara-github committed Feb 14, 2024
1 parent a58f83c commit 2ca5686
Show file tree
Hide file tree
Showing 33 changed files with 83 additions and 131 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:10
FROM debian:11

<%include file="../../apt_get_basic.include"/>
<%include file="../../ruby_3_0_deps.include"/>
<%include file="../../rvm_mkdir_workaround.include"/>

# Define the default command.
CMD ["bash"]
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:10
FROM debian:11

<%include file="../../apt_get_basic.include"/>
<%include file="../../ruby_3_1_deps.include"/>
<%include file="../../rvm_mkdir_workaround.include"/>

# Define the default command.
CMD ["bash"]
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:10
FROM debian:11

<%include file="../../apt_get_basic.include"/>
<%include file="../../ruby_3_2_deps.include"/>
<%include file="../../rvm_mkdir_workaround.include"/>

# Define the default command.
CMD ["bash"]
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:10
FROM debian:11

<%include file="../../apt_get_basic.include"/>
<%include file="../../ruby_3_3_deps.include"/>
<%include file="../../rvm_mkdir_workaround.include"/>

# Define the default command.
CMD ["bash"]
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

<%include file="../../apt_get_basic.include"/>
<%include file="../../run_tests_python_deps.include"/>
<%include file="../../ruby_deps.include"/>
<%include file="../../ruby_3_0_deps.include"/>
<%include file="../../rvm_mkdir_workaround.include"/>
<%include file="../../cmake.include"/>
<%include file="../../ccache.include"/>
<%include file="../../run_tests_addons.include"/>

# Define the default command.
CMD ["bash"]

CMD ["bash"]
17 changes: 0 additions & 17 deletions templates/tools/dockerfile/ruby_deps.include

This file was deleted.

3 changes: 3 additions & 0 deletions templates/tools/dockerfile/rvm_mkdir_workaround.include
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Workaround for rvm unable to find mkdir properly
# https://stackoverflow.com/questions/64653051
RUN ln -s /bin/mkdir /usr/bin/mkdir
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

<%include file="../../apt_get_basic.include"/>
<%include file="../../run_tests_python_deps.include"/>
<%include file="../../ruby_deps.include"/>
<%include file="../../ruby_3_0_deps.include"/>
<%include file="../../rvm_mkdir_workaround.include"/>
<%include file="../../cmake.include"/>
<%include file="../../ccache.include"/>
<%include file="../../run_tests_addons.include"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

<%include file="../../apt_get_basic.include"/>
<%include file="../../run_tests_python_deps.include"/>
<%include file="../../ruby_deps.include"/>
<%include file="../../ruby_3_0_deps.include"/>
<%include file="../../rvm_mkdir_workaround.include"/>
<%include file="../../cmake.include"/>
<%include file="../../ccache.include"/>
<%include file="../../run_tests_addons.include"/>
Expand Down
16 changes: 7 additions & 9 deletions tools/bazelify_tests/dockerimage_current_versions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,10 @@ DOCKERIMAGE_CURRENT_VERSIONS = {
"tools/dockerfile/distribtest/python_ubuntu2004_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_ubuntu2004_x64@sha256:342e9dc23b674ad256b220745745be818708a1baa25a2690f0d4f777e28a22a3",
"tools/dockerfile/distribtest/python_ubuntu2204_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_ubuntu2204_x64@sha256:b6ca497348741615406d1d571cf5042008da934c4f708877aa06a66b5dc3036c",
"tools/dockerfile/distribtest/ruby_centos7_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_centos7_x64@sha256:4d529b984b78ca179086f7f9b416605e2d9a96ca0a28a71f4421bb5ffdc18f96",
"tools/dockerfile/distribtest/ruby_debian10_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64@sha256:1298c39c950b2a48261555b6cff1ae66230a5020f100d3b381759285f0caf84e",
"tools/dockerfile/distribtest/ruby_debian10_x64_ruby_2_7.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_2_7@sha256:5ee26ad3abe2683c9a8ee03987ab0ae63f50793c3d3f5e4be6e6cbacb4556fcf",
"tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_0@sha256:be9dfa852af7fe5c700747bbad5b93d15c3f030ac980a107e98fc9b70fee6077",
"tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_1.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_1@sha256:282a052275fa9e0378301d759f5febcc9f1ff0ebb702e536690cd4fed1a43904",
"tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_2.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_2@sha256:f1ba9030d7d7496a6ed42c0e1a9a2fe3204208e94983d7d4b6b4c7752042ed28",
"tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_3.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_3@sha256:a26d6bfe8f799ae817db0bd0280283c2cc9ea0f02174fe9a2cb0cd10d71d81f8",
"tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_0.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_0@sha256:ed855e283001ea9f526aea3830e93c2138194e1740cf6aa5e11a19f6d81e0e22",
"tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_1.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_1@sha256:17e3f48a1e1ec2caade5ce4db73f92d6f1f27b34d7cba61968d8b3e3d15f9ca3",
"tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_2.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_2@sha256:aa5bf946f601a3ee557be63816428e6a4c997f33194c1a58499d0ca17e7bf562",
"tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_3.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_3@sha256:7643e5e91e9f24dc403ad967372c6a6b9a92ccb98fddaa5c29087e5e4ddb1f11",
"tools/dockerfile/distribtest/ruby_ubuntu2004_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2004_x64@sha256:426cbf625df0c0e7451b9716041996dc6a35a3788c1a24d68891256f84733d8e",
"tools/dockerfile/distribtest/ruby_ubuntu2204_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2204_x64@sha256:1c74c312f8a4ab37e629732a35daa3056e12136b90f37540cdf9fa11303c7eb8",
"tools/dockerfile/grpc_artifact_centos6_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_centos6_x64@sha256:3285047265ea2b7c5d4df4c769b2d05f56288d947c75e16d27ae2dee693f791b",
Expand All @@ -87,7 +85,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = {
"tools/dockerfile/interoptest/grpc_interop_php7.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_php7@sha256:9342ff81689c37d9e79fd6abcc08bf310eb48174e83bd3bfce39d225c02f0d4e",
"tools/dockerfile/interoptest/grpc_interop_python.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_python@sha256:1f55faacfb4be587e6d26b05561e79bf3e17fe81c69a990e8aeca4257081c9ac",
"tools/dockerfile/interoptest/grpc_interop_pythonasyncio.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_pythonasyncio@sha256:47127a7863097b436613885a8866a2ef055470452838ceebb31f692ac88ac1d1",
"tools/dockerfile/interoptest/grpc_interop_ruby.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_ruby@sha256:7b044d6848f82234dba81b38d8eca220b608f830f93b42932df59ed6fe20b24d",
"tools/dockerfile/interoptest/grpc_interop_ruby.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_ruby@sha256:efd7f41a736dd4b8f73b32f5215b86f6bfe9013c422dfcd77978de0253aaee45",
"tools/dockerfile/interoptest/lb_interop_fake_servers.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/lb_interop_fake_servers@sha256:b89a51dd9147e1293f50ee64dd719fce5929ca7894d3770a3d80dbdecb99fd52",
"tools/dockerfile/test/android_ndk.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/android_ndk@sha256:2866e815ceaf7407a9017842b86c1bf1efc96abe77ecff88e932aa1b1ddf727e",
"tools/dockerfile/test/bazel.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/bazel@sha256:32bde2dcb2087f2a32afab59e4dfedf7e8c76a52c69881f63a239d311f0e5ecf",
Expand All @@ -112,7 +110,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = {
"tools/dockerfile/test/python_debian11_default_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_arm64@sha256:fccca33a655c7aa89dd7ebd9492cbcc1f636bd2a004cd939d1982cfce3d68326",
"tools/dockerfile/test/python_debian11_default_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64@sha256:a956ff4bfbfa4fc6a00c7113f2dada7ce8cf4011f236f07197732981875d6519",
"tools/dockerfile/test/rbe_ubuntu2004.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rbe_ubuntu2004@sha256:d3951aeadf43e3bee6adc5b86d26cdaf0b9d1b5baf790d7b2530d1c197adc9f8",
"tools/dockerfile/test/ruby_debian11_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_arm64@sha256:7e77cf17e2e8657f4cc23ac9f93630bf13213fff961799e0f16dae17cd45cf6d",
"tools/dockerfile/test/ruby_debian11_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64@sha256:e4cb502caccf2db733268ce2ddc951fda8a9df2f7f53d6b74523c33d40c83006",
"tools/dockerfile/test/ruby_debian11_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_arm64@sha256:d2e79919b2e2d4cc36a29682ecb5170641df4fb506cfb453978ffdeb8a841bd9",
"tools/dockerfile/test/ruby_debian11_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64@sha256:f8fc0ec22065278e5bc02ad7f9a68191e46d083035b3a90ed587561dba9c58c5",
"tools/dockerfile/test/sanity.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/sanity@sha256:ca65b29302e8e381aabf9deb1952281f4e9963654e19c3d681148b5aa972c8a2",
}

This file was deleted.

19 changes: 0 additions & 19 deletions tools/dockerfile/distribtest/ruby_debian10_x64/Dockerfile

This file was deleted.

This file was deleted.

42 changes: 0 additions & 42 deletions tools/dockerfile/distribtest/ruby_debian10_x64_ruby_2_7/Dockerfile

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_0:ddf5f067d1e4ae46f4178ef14d2ea2cea6ae6c76@sha256:ed855e283001ea9f526aea3830e93c2138194e1740cf6aa5e11a19f6d81e0e22
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:10
FROM debian:11

#=================
# Basic C core dependencies
Expand Down Expand Up @@ -79,6 +79,10 @@ RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.0.5' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document"

# Workaround for rvm unable to find mkdir properly
# https://stackoverflow.com/questions/64653051
RUN ln -s /bin/mkdir /usr/bin/mkdir


# Define the default command.
CMD ["bash"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_1:d6f1ff5cee79b1c3829573d15ea68c5b453f2f8d@sha256:17e3f48a1e1ec2caade5ce4db73f92d6f1f27b34d7cba61968d8b3e3d15f9ca3
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:10
FROM debian:11

#=================
# Basic C core dependencies
Expand Down Expand Up @@ -79,6 +79,10 @@ RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.1.3' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document"

# Workaround for rvm unable to find mkdir properly
# https://stackoverflow.com/questions/64653051
RUN ln -s /bin/mkdir /usr/bin/mkdir


# Define the default command.
CMD ["bash"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_2:88a99c45a0bc5fedd959731d78817781b0b545bc@sha256:aa5bf946f601a3ee557be63816428e6a4c997f33194c1a58499d0ca17e7bf562
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:10
FROM debian:11

#=================
# Basic C core dependencies
Expand Down Expand Up @@ -79,6 +79,10 @@ RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.2.0' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document"

# Workaround for rvm unable to find mkdir properly
# https://stackoverflow.com/questions/64653051
RUN ln -s /bin/mkdir /usr/bin/mkdir


# Define the default command.
CMD ["bash"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_3:3fc462641e0ecd88ddd38a3ab14fa70c291f98b0@sha256:7643e5e91e9f24dc403ad967372c6a6b9a92ccb98fddaa5c29087e5e4ddb1f11
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM debian:10
FROM debian:11

#=================
# Basic C core dependencies
Expand Down Expand Up @@ -79,6 +79,10 @@ RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.3.0' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document"

# Workaround for rvm unable to find mkdir properly
# https://stackoverflow.com/questions/64653051
RUN ln -s /bin/mkdir /usr/bin/mkdir


# Define the default command.
CMD ["bash"]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_ruby:b234d5eeaa79e9dff66484a1a76d142786064a9c@sha256:7b044d6848f82234dba81b38d8eca220b608f830f93b42932df59ed6fe20b24d
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_ruby:28d14e44cd85d7dbe814c72156be140ab120beec@sha256:efd7f41a736dd4b8f73b32f5215b86f6bfe9013c422dfcd77978de0253aaee45
15 changes: 9 additions & 6 deletions tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,19 @@ RUN apt-get update && apt-get install -y gnupg2 && apt-get clean
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable

# Install Ruby 2.7
# Install Ruby 3.0
RUN apt-get update && apt-get install -y procps && apt-get clean
# "--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 "rvm install ruby-3.0.5"
RUN /bin/bash -l -c "rvm use --default ruby-3.0.5"
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.0.5' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document"

# Workaround for rvm unable to find mkdir properly
# https://stackoverflow.com/questions/64653051
RUN ln -s /bin/mkdir /usr/bin/mkdir

#=================
# Install cmake
# Note that this step should be only used for distributions that have new enough cmake to satisfy gRPC's cmake version requirement.
Expand All @@ -130,4 +133,4 @@ RUN mkdir /var/local/jenkins


# Define the default command.
CMD ["bash"]
CMD ["bash"]
Loading

0 comments on commit 2ca5686

Please sign in to comment.