Skip to content

Commit 095988b

Browse files
authored
Drop support for ruby 2.5 (#30699) (#30762)
* Drop ruby 2.5 support
1 parent ea0ca35 commit 095988b

13 files changed

Lines changed: 59 additions & 86 deletions

File tree

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ task 'gem:native', [:plat] do |t, args|
144144
verbose = ENV['V'] || '0'
145145

146146
grpc_config = ENV['GRPC_CONFIG'] || 'opt'
147-
ruby_cc_versions = ['3.1.0', '3.0.0', '2.7.0', '2.6.0', '2.5.0'].join(':')
147+
ruby_cc_versions = ['3.1.0', '3.0.0', '2.7.0', '2.6.0'].join(':')
148148
selected_plat = "#{args[:plat]}"
149149

150150
if RUBY_PLATFORM =~ /darwin/

templates/tools/dockerfile/ruby_deps.include

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ RUN apt-get update && apt-get install -y gnupg2 && apt-get clean
66
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
77
RUN \curl -sSL https://get.rvm.io | bash -s stable
88

9-
# Install Ruby 2.5
9+
# Install Ruby 2.7
1010
RUN apt-get update && apt-get install -y procps && apt-get clean
11-
RUN /bin/bash -l -c "rvm install ruby-2.5"
12-
RUN /bin/bash -l -c "rvm use --default ruby-2.5"
11+
RUN /bin/bash -l -c "rvm install ruby-2.7"
12+
RUN /bin/bash -l -c "rvm use --default ruby-2.7"
1313
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
1414
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
15-
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.5' >> ~/.bashrc"
16-
RUN /bin/bash -l -c "gem install bundler --no-document -v 1.9"
15+
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc"
16+
RUN /bin/bash -l -c "gem install bundler --no-document"

tools/dockerfile/distribtest/ruby_centos7_x64/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ RUN yum update -y && yum install -y curl tar which
2020
RUN gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
2121
RUN curl -sSL https://get.rvm.io | bash -s stable
2222

23-
# Install Ruby 2.3
24-
RUN /bin/bash -l -c "rvm install ruby-2.5.7"
25-
RUN /bin/bash -l -c "rvm use --default ruby-2.5.7"
23+
# Install Ruby 2.7
24+
RUN /bin/bash -l -c "rvm install ruby-2.7"
25+
RUN /bin/bash -l -c "rvm use --default ruby-2.7"
2626
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
2727
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
28-
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.5.7' >> ~/.bashrc"
29-
RUN /bin/bash -l -c "gem install bundler -v 1.17.3 --no-document"
28+
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc"
29+
RUN /bin/bash -l -c "gem install bundler --no-document"
3030

3131
RUN mkdir /var/local/jenkins
3232

tools/dockerfile/distribtest/ruby_stretch_x64_ruby_2_5/Dockerfile

Lines changed: 0 additions & 42 deletions
This file was deleted.

tools/dockerfile/distribtest/ruby_ubuntu1604_x64/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ RUN apt-get update -y && apt-get install -y \
2626
RUN gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
2727
RUN \curl -sSL https://get.rvm.io | bash -s stable
2828

29-
# Install Ruby 2.4
30-
RUN /bin/bash -l -c "rvm install ruby-2.5.7"
31-
RUN /bin/bash -l -c "rvm use --default ruby-2.5.7"
29+
# Install Ruby 2.7
30+
RUN /bin/bash -l -c "rvm install ruby-2.7"
31+
RUN /bin/bash -l -c "rvm use --default ruby-2.7"
3232
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
3333
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
34-
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.5.7' >> ~/.bashrc"
35-
RUN /bin/bash -l -c "gem install bundler -v 1.17.3 --no-document"
34+
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc"
35+
RUN /bin/bash -l -c "gem install bundler --no-document"

tools/dockerfile/distribtest/ruby_ubuntu1804_x64/Dockerfile

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@
1414

1515
FROM ubuntu:18.04
1616

17-
RUN apt-get update -y && apt-get install -y ruby-full
17+
# Install Git and basic packages.
18+
RUN apt-get update -y && apt-get install -y \
19+
curl \
20+
gnupg2 \
21+
gcc && apt-get clean
1822

19-
RUN gem install bundler
23+
# Install rvm
24+
RUN gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
25+
RUN \curl -sSL https://get.rvm.io | bash -s stable
26+
27+
# Install Ruby 2.7
28+
RUN /bin/bash -l -c "rvm install ruby-2.7"
29+
RUN /bin/bash -l -c "rvm use --default ruby-2.7"
30+
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
31+
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
32+
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc"
33+
RUN /bin/bash -l -c "gem install bundler --no-document"

tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ RUN apt-get update && apt-get install -y gnupg2 && apt-get clean
8686
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
8787
RUN \curl -sSL https://get.rvm.io | bash -s stable
8888

89-
# Install Ruby 2.5
89+
# Install Ruby 2.7
9090
RUN apt-get update && apt-get install -y procps && apt-get clean
91-
RUN /bin/bash -l -c "rvm install ruby-2.5"
92-
RUN /bin/bash -l -c "rvm use --default ruby-2.5"
91+
RUN /bin/bash -l -c "rvm install ruby-2.7"
92+
RUN /bin/bash -l -c "rvm use --default ruby-2.7"
9393
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
9494
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
95-
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.5' >> ~/.bashrc"
96-
RUN /bin/bash -l -c "gem install bundler --no-document -v 1.9"
95+
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc"
96+
RUN /bin/bash -l -c "gem install bundler --no-document"
9797

9898
#=================
9999
# Install cmake

tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ${name}')
2727
cp -r /var/local/jenkins/service_account $HOME || true
2828

2929
cd /var/local/git/grpc
30-
rvm --default use ruby-2.5
30+
rvm --default use ruby-2.7
3131

3232
# build Ruby interop client and server
33-
(cd src/ruby && gem install bundler -v 1.17.3 && bundle && bundle exec rake compile)
33+
(cd src/ruby && gem install bundler && bundle && bundle exec rake compile)

tools/dockerfile/test/ruby_debian11_arm64/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ RUN apt-get update && apt-get install -y gnupg2 && apt-get clean
8686
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
8787
RUN \curl -sSL https://get.rvm.io | bash -s stable
8888

89-
# Install Ruby 2.5
89+
# Install Ruby 2.7
9090
RUN apt-get update && apt-get install -y procps && apt-get clean
91-
RUN /bin/bash -l -c "rvm install ruby-2.5"
92-
RUN /bin/bash -l -c "rvm use --default ruby-2.5"
91+
RUN /bin/bash -l -c "rvm install ruby-2.7"
92+
RUN /bin/bash -l -c "rvm use --default ruby-2.7"
9393
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
9494
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
95-
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.5' >> ~/.bashrc"
96-
RUN /bin/bash -l -c "gem install bundler --no-document -v 1.9"
95+
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc"
96+
RUN /bin/bash -l -c "gem install bundler --no-document"
9797

9898
#=================
9999
# Install cmake

tools/dockerfile/test/ruby_debian11_x64/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ RUN apt-get update && apt-get install -y gnupg2 && apt-get clean
8686
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
8787
RUN \curl -sSL https://get.rvm.io | bash -s stable
8888

89-
# Install Ruby 2.5
89+
# Install Ruby 2.7
9090
RUN apt-get update && apt-get install -y procps && apt-get clean
91-
RUN /bin/bash -l -c "rvm install ruby-2.5"
92-
RUN /bin/bash -l -c "rvm use --default ruby-2.5"
91+
RUN /bin/bash -l -c "rvm install ruby-2.7"
92+
RUN /bin/bash -l -c "rvm use --default ruby-2.7"
9393
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
9494
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
95-
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.5' >> ~/.bashrc"
96-
RUN /bin/bash -l -c "gem install bundler --no-document -v 1.9"
95+
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.7' >> ~/.bashrc"
96+
RUN /bin/bash -l -c "gem install bundler --no-document"
9797

9898
#=================
9999
# Install cmake

0 commit comments

Comments
 (0)