Ensure .NET Core runtimes are install in alpine builds to tests can run

This commit is contained in:
Nate McMaster 2018-07-03 11:14:40 -07:00
parent 5717594baf
commit a7811c5656
No known key found for this signature in database
GPG Key ID: A778D9601BD78810
4 changed files with 2 additions and 20 deletions

View File

@ -530,7 +530,7 @@
<Target Name="BuildSharedFx" DependsOnTargets="GeneratePropsFiles;ResolveSharedFxFiles;CrossGenAssemblies;CrossGenSymbols;PackSharedFx;TestSharedFx"/> <Target Name="BuildSharedFx" DependsOnTargets="GeneratePropsFiles;ResolveSharedFxFiles;CrossGenAssemblies;CrossGenSymbols;PackSharedFx;TestSharedFx"/>
<Target Name="TestSharedFx" DependsOnTargets="DefineSharedFxPrerequisites;ResolveCommitHash"> <Target Name="TestSharedFx" DependsOnTargets="GeneratePropsFiles;DefineSharedFxPrerequisites;ResolveCommitHash;InstallDotNet">
<PropertyGroup> <PropertyGroup>
<UnitTestFxProject>$(RepositoryRoot)\test\SharedFx.UnitTests\SharedFx.UnitTests.csproj</UnitTestFxProject> <UnitTestFxProject>$(RepositoryRoot)\test\SharedFx.UnitTests\SharedFx.UnitTests.csproj</UnitTestFxProject>
<UnitTestFxTestProps> <UnitTestFxTestProps>

View File

@ -25,14 +25,3 @@ ENV LANG en_US.UTF-8
# Skip package initilization # Skip package initilization
ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Workarounds https://github.com/dotnet/cli/issues/8738
ENV DOTNET_INSTALL_SKIP_PREREQS=1
ENV KOREBUILD_SKIP_RUNTIME_INSTALL=1
COPY global.json /tmp/global.json
RUN DOTNET_SDK_VERSION="$(jq -r '.sdk.version' /tmp/global.json)" \
&& echo "Installing SDK ${DOTNET_SDK_VERSION}" \
&& wget -q --tries 10 -O /tmp/dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-musl-x64.tar.gz \
&& mkdir -p "$HOME/.dotnet" \
&& tar xzf /tmp/dotnet.tar.gz -C "$HOME/.dotnet"

View File

@ -43,7 +43,7 @@
<ItemGroup> <ItemGroup>
<!-- Explicitly require the 2.0.x and 2.1.0-* version of shared runtime used by universe --> <!-- Explicitly require the 2.0.x and 2.1.0-* version of shared runtime used by universe -->
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" /> <DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" Condition="'$(SharedFXRid)' != 'linux-musl-x64'" />
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" <DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)"
Feed="$(DotNetAssetRootUrl)" Feed="$(DotNetAssetRootUrl)"

View File

@ -90,13 +90,6 @@ fi
dockerfile="$DIR/build/docker/$image.Dockerfile" dockerfile="$DIR/build/docker/$image.Dockerfile"
tagname="universe-build-$image" tagname="universe-build-$image"
# Workaround for https://github.com/dotnet/cli/issues/8738 and https://github.com/Microsoft/msbuild/issues/3066
# Run noop target because we need to generate the global.json file so we can install the matching
# .NET Core SDK inside the Docker container.
"$DIR/build.sh" /t:Noop
cp "$DIR/global.json" "$(dirname "$dockerfile")"
#endworkaround
docker build "$(dirname "$dockerfile")" \ docker build "$(dirname "$dockerfile")" \
--build-arg "USER=$(whoami)" \ --build-arg "USER=$(whoami)" \
--build-arg "USER_ID=$(id -u)" \ --build-arg "USER_ID=$(id -u)" \