diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/distpackages/build_deb_packages.sh | 11 | ||||
-rw-r--r-- | tools/dockerfile/grpc_build_deb/Dockerfile | 13 | ||||
-rw-r--r-- | tools/dockerfile/grpc_ruby_deb/Dockerfile | 31 | ||||
-rw-r--r-- | tools/dockerfile/grpc_ruby_deb/README.md | 5 | ||||
-rw-r--r-- | tools/run_tests/tests.json | 8 |
5 files changed, 62 insertions, 6 deletions
diff --git a/tools/distpackages/build_deb_packages.sh b/tools/distpackages/build_deb_packages.sh index f9cf802340..a5f945bd9a 100755 --- a/tools/distpackages/build_deb_packages.sh +++ b/tools/distpackages/build_deb_packages.sh @@ -35,7 +35,13 @@ mkdir -p $deb_dest version='0.8.0.0' -arch=`uname -p` +if [ -f /.dockerinit ]; then + # We're in Docker where uname -p returns "unknown". + arch=x86_64 +else + arch=`uname -p` +fi + if [ $arch != "x86_64" ] then echo Unsupported architecture. @@ -77,13 +83,14 @@ do # create symlinks to shared libraries for libname in $arch_lib_dir/*.a do - base=`basename -s .a $libname` + base=`basename $libname .a` ln -s $base.so.$version $arch_lib_dir/$base.so done fi # Adjust mode for some files in the package find $tmp_dir/$pkg_name -type d | xargs chmod 755 + find $tmp_dir/$pkg_name -type d | xargs chmod a-s find $tmp_dir/$pkg_name -type f | xargs chmod 644 chmod 755 $tmp_dir/$pkg_name/DEBIAN/{postinst,postrm} diff --git a/tools/dockerfile/grpc_build_deb/Dockerfile b/tools/dockerfile/grpc_build_deb/Dockerfile new file mode 100644 index 0000000000..ad26fb35d0 --- /dev/null +++ b/tools/dockerfile/grpc_build_deb/Dockerfile @@ -0,0 +1,13 @@ +# Dockerfile to build Debian packages for gRPC C core. +FROM grpc/base + +# Install dependencies +RUN apt-get update && apt-get install -y lintian + +# Get the source from GitHub +RUN git clone git@github.com:grpc/grpc.git /var/local/git/grpc +RUN cd /var/local/git/grpc && \ + git pull --recurse-submodules && \ + git submodule update --init --recursive + +RUN /bin/bash -l -c 'cd /var/local/git/grpc/tools/distpackages && ./build_deb_packages.sh' diff --git a/tools/dockerfile/grpc_ruby_deb/Dockerfile b/tools/dockerfile/grpc_ruby_deb/Dockerfile new file mode 100644 index 0000000000..25ea2c54bd --- /dev/null +++ b/tools/dockerfile/grpc_ruby_deb/Dockerfile @@ -0,0 +1,31 @@ +# Dockerfile for gRPC Ruby, but using Debian packages for gRPC C core. +FROM grpc/ruby_base + +# Pull the latest sources +RUN cd /var/local/git/grpc \ + && git pull --recurse-submodules \ + && git submodule update --init --recursive + +# Make sure we don't rely on things that shouldn't be there. +RUN make clean -C /var/local/git/grpc + +# Debian packages need to be supplied externally +ADD libgrpc_amd64.deb libgrpc_amd64.deb +ADD libgrpc-dev_amd64.deb libgrpc-dev_amd64.deb + +# Install the C core .deb packages +RUN /bin/bash -l -c 'dpkg -i libgrpc_amd64.deb libgrpc-dev_amd64.deb' + +# Build ruby gRPC and run its tests +RUN /bin/bash -l -c 'cd /var/local/git/grpc/src/ruby && bundle && rake' + +# Add a cacerts directory containing the Google root pem file, allowing the +# ruby client to access the production test instance +ADD cacerts cacerts + +# Add a service_account directory containing the auth creds file +ADD service_account service_account + +# Specify the default command such that the interop server runs on its known +# testing port +CMD ["/bin/bash", "-l", "-c", "ruby /var/local/git/grpc/src/ruby/bin/interop/interop_server.rb --use_tls --port 8060"] diff --git a/tools/dockerfile/grpc_ruby_deb/README.md b/tools/dockerfile/grpc_ruby_deb/README.md new file mode 100644 index 0000000000..0a3716b938 --- /dev/null +++ b/tools/dockerfile/grpc_ruby_deb/README.md @@ -0,0 +1,5 @@ +GRPC RUBY Base Dockerfile (Debian package version) +======================== + +Dockerfile for creating the Ruby gRPC development Docker instance. +Uses gRPC C core Debian packages instead of installing it using make. diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index ee4f6f896e..84f830c456 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -191,10 +191,6 @@ }, { "language": "c", - "name": "interop_test" - }, - { - "language": "c", "name": "json_rewrite_test" }, { @@ -287,6 +283,10 @@ }, { "language": "c++", + "name": "interop_test" + }, + { + "language": "c++", "name": "pubsub_publisher_test" }, { |