Skip to content

Commit

Permalink
Merge pull request #353 from nicolasnoble/downgrade-even-more
Browse files Browse the repository at this point in the history
Split native and cross compilers into two docker images.
  • Loading branch information
nicolasnoble authored May 18, 2018
2 parents 03fd167 + 968a706 commit f853876
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@ npm install -g npm
# https://github.com/mapbox/node-pre-gyp/issues/362
npm install -g node-gyp

DO_NATIVE=true
DO_CROSS=true

while [ $# -gt 0 ] ; do
case $1 in
--native-only)
DO_CROSS=false
;;
--cross-only)
DO_NATIVE=false
;;
esac
shift
done

set -ex

cd $(dirname $0)
Expand All @@ -34,10 +49,13 @@ rm -rf build || true

mkdir -p "${ARTIFACTS_OUT}"

docker build -t alpine_node_artifact $base_dir/tools/docker/alpine_artifact

$tool_dir/build_artifact_node.sh
if [ "$DO_NATIVE" = "true" ] ; then
$tool_dir/build_artifact_node.sh
fi

$tool_dir/build_artifact_node_arm.sh
if [ "$DO_CROSS" = "true" ] ; then
$tool_dir/build_artifact_node_arm.sh

docker run -e JOBS=8 -e ARTIFACTS_OUT=/var/grpc/artifacts -v $base_dir:/var/grpc alpine_node_artifact /var/grpc/tools/run_tests/artifacts/build_artifact_node.sh --with-alpine
docker build -t alpine_node_artifact $base_dir/tools/docker/alpine_artifact
docker run -e JOBS=8 -e ARTIFACTS_OUT=/var/grpc/artifacts -v $base_dir:/var/grpc alpine_node_artifact /var/grpc/tools/run_tests/artifacts/build_artifact_node.sh --with-alpine
fi
File renamed without changes.
7 changes: 5 additions & 2 deletions tools/release/kokoro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ OS=`uname`

case $OS in
Linux)
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
docker build -t kokoro-native-image tools/release/native
docker build -t kokoro-cross-image tools/release/cross
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $base_dir:$base_dir kokoro-native-image $base_dir/packages/grpc-native-core/tools/run_tests/artifacts/build_all_linux_artifacts.sh --native-only
cp -rv packages/grpc-native-core/artifacts .
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $base_dir:$base_dir kokoro-cross-image $base_dir/packages/grpc-native-core/tools/run_tests/artifacts/build_all_linux_artifacts.sh --cross-only
cp -rv packages/grpc-native-core/artifacts .
;;
Darwin)
Expand Down
10 changes: 10 additions & 0 deletions tools/release/native/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM debian:jessie

RUN apt-get update
RUN apt-get install -y curl build-essential python libc6-dev-i386 lib32stdc++-4.9-dev
RUN curl -fsSL get.docker.com | bash

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

0 comments on commit f853876

Please sign in to comment.