add cmake to ruby dockerfiles

pull/24000/head
Jan Tattermusch 4 years ago
parent a35cd4f89d
commit c5c123efc9
  1. 3
      templates/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile.template
  2. 3
      templates/tools/dockerfile/ruby_deps.include
  3. 3
      templates/tools/dockerfile/test/ruby_buster_x64/Dockerfile.template
  4. 12
      tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
  5. 12
      tools/dockerfile/test/ruby_buster_x64/Dockerfile
  6. 3
      tools/run_tests/helper_scripts/build_ruby.sh

@ -14,11 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
<%include file="../../debian_jessie_header.include"/>
FROM debian:buster
<%include file="../../apt_get_basic.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../ruby_deps.include"/>
<%include file="../../cmake.include"/>
<%include file="../../run_tests_addons.include"/>
# Define the default command.
CMD ["bash"]

@ -2,11 +2,12 @@
# Ruby dependencies
# Install rvm
RUN apt-get update && apt-get install -y gnupg2
RUN apt-get update && apt-get install -y gnupg2 && apt-get clean
RUN gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable
# Install Ruby 2.5
RUN apt-get update && apt-get install -y procps && apt-get clean
RUN /bin/bash -l -c "rvm install ruby-2.5"
RUN /bin/bash -l -c "rvm use --default ruby-2.5"
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"

@ -14,12 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
<%include file="../../debian_jessie_header.include"/>
FROM debian:buster
<%include file="../../apt_get_basic.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../gcp_api_libraries.include"/>
<%include file="../../ruby_deps.include"/>
<%include file="../../cmake.include"/>
<%include file="../../run_tests_addons.include"/>
# Define the default command.
CMD ["bash"]

@ -12,8 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:jessie
FROM debian:buster
# Install Git and basic packages.
RUN apt-get update && apt-get install -y \
@ -70,11 +69,12 @@ RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.15.0 t
# Ruby dependencies
# Install rvm
RUN apt-get update && apt-get install -y gnupg2
RUN apt-get update && apt-get install -y gnupg2 && apt-get clean
RUN gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable
# Install Ruby 2.5
RUN apt-get update && apt-get install -y procps && apt-get clean
RUN /bin/bash -l -c "rvm install ruby-2.5"
RUN /bin/bash -l -c "rvm use --default ruby-2.5"
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
@ -82,6 +82,12 @@ 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.5' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document -v 1.9"
#=================
# Install cmake
# Note that this step should be only used for distributions that have new enough cmake to satisfy gRPC's cmake version requirement.
RUN apt-get update && apt-get install -y cmake && apt-get clean
RUN mkdir /var/local/jenkins

@ -12,8 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:jessie
FROM debian:buster
# Install Git and basic packages.
RUN apt-get update && apt-get install -y \
@ -73,11 +72,12 @@ RUN pip install --upgrade google-api-python-client oauth2client
# Ruby dependencies
# Install rvm
RUN apt-get update && apt-get install -y gnupg2
RUN apt-get update && apt-get install -y gnupg2 && apt-get clean
RUN gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN \curl -sSL https://get.rvm.io | bash -s stable
# Install Ruby 2.5
RUN apt-get update && apt-get install -y procps && apt-get clean
RUN /bin/bash -l -c "rvm install ruby-2.5"
RUN /bin/bash -l -c "rvm use --default ruby-2.5"
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
@ -85,6 +85,12 @@ 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.5' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-document -v 1.9"
#=================
# Install cmake
# Note that this step should be only used for distributions that have new enough cmake to satisfy gRPC's cmake version requirement.
RUN apt-get update && apt-get install -y cmake && apt-get clean
RUN mkdir /var/local/jenkins

@ -25,8 +25,6 @@ rm -rf ./tmp
rake compile
# build grpc_ruby_plugin
# TODO: fix this
#make grpc_ruby_plugin -j8
mkdir -p cmake/build
pushd cmake/build
cmake -DgRPC_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release ../..
@ -34,4 +32,5 @@ make protoc grpc_ruby_plugin -j2
popd
# unbreak subsequent make builds by restoring zconf.h (previously renamed by cmake build)
# see https://github.com/madler/zlib/issues/133
(cd third_party/zlib; git checkout zconf.h)

Loading…
Cancel
Save