From 9345d4d0b51e699da07a12b6824fbf07c165ca3f Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 11 May 2018 00:16:09 +0200 Subject: [PATCH] Using docker... --- .../run_tests/artifacts/build_all_linux_artifacts.sh | 7 +++++++ tools/release/kokoro.sh | 5 ++--- tools/release/kokoro/Dockerfile | 10 ++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 tools/release/kokoro/Dockerfile diff --git a/packages/grpc-native-core/tools/run_tests/artifacts/build_all_linux_artifacts.sh b/packages/grpc-native-core/tools/run_tests/artifacts/build_all_linux_artifacts.sh index 59f62a2f..64d3d862 100755 --- a/packages/grpc-native-core/tools/run_tests/artifacts/build_all_linux_artifacts.sh +++ b/packages/grpc-native-core/tools/run_tests/artifacts/build_all_linux_artifacts.sh @@ -13,6 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" +nvm install 10 +nvm use 10 +npm install -g npm +# https://github.com/mapbox/node-pre-gyp/issues/362 +npm install -g node-gyp + set -ex cd $(dirname $0) diff --git a/tools/release/kokoro.sh b/tools/release/kokoro.sh index 6d211861..34604c59 100755 --- a/tools/release/kokoro.sh +++ b/tools/release/kokoro.sh @@ -38,9 +38,8 @@ OS=`uname` case $OS in Linux) - sudo apt-get update - sudo apt-get install -y linux-libc-dev:i386 g++-aarch64-linux-gnu g++-arm-linux-gnueabihf - ./packages/grpc-native-core/tools/run_tests/artifacts/build_all_linux_artifacts.sh + docker build -t kokoro-image tools/release/kokoro + docker run -v /var/run/docker.sock:/var/run/docker.sock -v $base_dir:$base_dir kokoro-image $base_dir/packages/grpc-native-core/tools/run_tests/artifacts/build_all_linux_artifacts.sh mv packages/grpc-native-core/artifacts . ;; Darwin) diff --git a/tools/release/kokoro/Dockerfile b/tools/release/kokoro/Dockerfile new file mode 100644 index 00000000..0c31914b --- /dev/null +++ b/tools/release/kokoro/Dockerfile @@ -0,0 +1,10 @@ +FROM ubuntu:16.04 + +RUN dpkg --add-architecture i386 +RUN apt-get update +RUN apt-get install -y curl build-essential g++-aarch64-linux-gnu g++-arm-linux-gnueabihf docker.io python libc6-dev:i386 lib32stdc++-5-dev + +RUN mkdir /usr/local/nvm +ENV NVM_DIR /usr/local/nvm + +RUN curl curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash