Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add C# distribtest for alpine linux #17272

Merged
merged 1 commit into from
Oct 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 8 additions & 5 deletions test/distrib/csharp/run_distrib_test_dotnetcli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ dotnet publish -f net45 DistribTestDotNet.csproj

ls -R bin

# .NET 4.5 target after dotnet build
mono bin/Debug/net45/publish/DistribTestDotNet.exe

# .NET 4.5 target after dotnet publish
mono bin/Debug/net45/publish/DistribTestDotNet.exe
if [ "${SKIP_MONO_DISTRIBTEST}" != "1" ]
then
# .NET 4.5 target after dotnet build
mono bin/Debug/net45/publish/DistribTestDotNet.exe

# .NET 4.5 target after dotnet publish
mono bin/Debug/net45/publish/DistribTestDotNet.exe
fi

# .NET Core target after dotnet build
dotnet exec bin/Debug/netcoreapp2.1/DistribTestDotNet.dll
Expand Down
28 changes: 28 additions & 0 deletions tools/dockerfile/distribtest/csharp_alpine_x64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2019 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM mcr.microsoft.com/dotnet/core/sdk:2.1-alpine3.9

RUN apk update && apk add bash
RUN apk update && apk add unzip

# Workaround for https://github.com/grpc/grpc/issues/18428
# Also see https://github.com/sgerrand/alpine-pkg-glibc
RUN apk update && apk --no-cache add ca-certificates wget
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.30-r0/glibc-2.30-r0.apk
RUN apk add glibc-2.30-r0.apk

# installing mono on alpine is hard and we don't really need it
ENV SKIP_MONO_DISTRIBTEST=1
1 change: 1 addition & 0 deletions tools/run_tests/artifacts/distribtest_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ def targets():
CSharpDistribTest('linux', 'x64', 'centos7'),
CSharpDistribTest('linux', 'x64', 'ubuntu1604'),
CSharpDistribTest('linux', 'x64', 'ubuntu1604', use_dotnet_cli=True),
CSharpDistribTest('linux', 'x64', 'alpine', use_dotnet_cli=True),
CSharpDistribTest('macos', 'x86'),
CSharpDistribTest('windows', 'x86'),
CSharpDistribTest('windows', 'x64'),
Expand Down