From 995b014904438e224fa6e12356bd99630761111a Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 10 Apr 2019 11:31:16 -0700 Subject: [PATCH 1/2] Update aspnetcore interop scripts to use activate.sh --- .../grpc_interop_aspnetcore/build_interop.sh.template | 9 +++------ .../interoptest/grpc_interop_aspnetcore/build_interop.sh | 5 +---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh.template b/templates/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh.template index 53c5adae0d1..bab5007cee1 100644 --- a/templates/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh.template +++ b/templates/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh.template @@ -25,14 +25,11 @@ cp -r /var/local/jenkins/service_account $HOME || true cd /var/local/git/grpc-dotnet - + # If needed, update dotnet SDK and put it on path ./build/get-dotnet.sh - if [ -f $HOME/.dotnet/dotnet ] - then - ln -s $HOME/.dotnet/dotnet /usr/local/bin/dotnet - fi - + source ./activate.sh + ./build/get-grpc.sh cd testassets/InteropTestsWebsite diff --git a/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh index ce21e0f335d..1e3ae88ccbb 100644 --- a/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh +++ b/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh @@ -26,10 +26,7 @@ cd /var/local/git/grpc-dotnet # If needed, update dotnet SDK and put it on path ./build/get-dotnet.sh -if [ -f $HOME/.dotnet/dotnet ] -then - ln -s $HOME/.dotnet/dotnet /usr/local/bin/dotnet -fi +source ./activate.sh ./build/get-grpc.sh From d5c3108e467e54458b8cd28c7dee78008d6601d0 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 12 Apr 2019 06:33:07 -0400 Subject: [PATCH 2/2] workaround the need to source activate.sh --- .../build_interop.sh.template | 13 +++++++++++-- .../grpc_interop_aspnetcore/build_interop.sh | 11 ++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh.template b/templates/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh.template index bab5007cee1..05ad947e944 100644 --- a/templates/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh.template +++ b/templates/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh.template @@ -28,8 +28,17 @@ # If needed, update dotnet SDK and put it on path ./build/get-dotnet.sh - source ./activate.sh - + # Normally we would source ./activate.sh + # to add dotnet to PATH, but that would only + # work for the build and not for a subsequent + # dotnet run from a different shell, + # so we create a symlink instead. + # TODO(jtattermusch): Come up with a cleaner solution. + if [ -f $(pwd)/.dotnet/dotnet ] + then + ln -s $(pwd)/.dotnet/dotnet /usr/local/bin/dotnet + fi + ./build/get-grpc.sh cd testassets/InteropTestsWebsite diff --git a/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh index 1e3ae88ccbb..2a3e6f3a0ee 100644 --- a/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh +++ b/tools/dockerfile/interoptest/grpc_interop_aspnetcore/build_interop.sh @@ -26,7 +26,16 @@ cd /var/local/git/grpc-dotnet # If needed, update dotnet SDK and put it on path ./build/get-dotnet.sh -source ./activate.sh +# Normally we would source ./activate.sh +# to add dotnet to PATH, but that would only +# work for the build and not for a subsequent +# dotnet run from a different shell, +# so we create a symlink instead. +# TODO(jtattermusch): Come up with a cleaner solution. +if [ -f $(pwd)/.dotnet/dotnet ] +then + ln -s $(pwd)/.dotnet/dotnet /usr/local/bin/dotnet +fi ./build/get-grpc.sh