Merge branch 'release/2.1' into release/2.2
This commit is contained in:
commit
71de7a98f5
|
|
@ -530,15 +530,16 @@
|
||||||
|
|
||||||
<Target Name="BuildSharedFx" DependsOnTargets="GeneratePropsFiles;ResolveSharedFxFiles;CrossGenAssemblies;CrossGenSymbols;PackSharedFx;TestSharedFx"/>
|
<Target Name="BuildSharedFx" DependsOnTargets="GeneratePropsFiles;ResolveSharedFxFiles;CrossGenAssemblies;CrossGenSymbols;PackSharedFx;TestSharedFx"/>
|
||||||
|
|
||||||
<PropertyGroup>
|
<Target Name="TestSharedFx" DependsOnTargets="GeneratePropsFiles;DefineSharedFxPrerequisites;ResolveCommitHash;InstallDotNet">
|
||||||
<UnitTestFxProject>$(RepositoryRoot)\test\SharedFx.UnitTests\SharedFx.UnitTests.csproj</UnitTestFxProject>
|
|
||||||
<UnitTestFxTrxLogFile>$(LogOutputDir)SharedFx-UnitTests.trx</UnitTestFxTrxLogFile>
|
|
||||||
<UnitTestFxTrxPhysicalFilePath>$(UnitTestFxTrxLogFile)</UnitTestFxTrxPhysicalFilePath>
|
|
||||||
<UnitTestFxTrxPhysicalFilePath Condition="'$(HostMachineRepositoryRoot)' != ''">$(HostMachineRepositoryRoot)/artifacts/logs/SharedFx-UnitTests.trx</UnitTestFxTrxPhysicalFilePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Target Name="TestSharedFx" DependsOnTargets="DefineSharedFxPrerequisites;ResolveCommitHash;InstallDotNet">
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<UnitTestFxProject>$(RepositoryRoot)\test\SharedFx.UnitTests\SharedFx.UnitTests.csproj</UnitTestFxProject>
|
||||||
|
|
||||||
|
<!-- The file path to the log file, from within the container -->
|
||||||
|
<UnitTestFxTrxLogFile>$(LogOutputDir)SharedFx-UnitTests-$(Version).trx</UnitTestFxTrxLogFile>
|
||||||
|
<!-- The trx file path from the perspective of the TeamCity agent -->
|
||||||
|
<UnitTestFxTrxPhysicalFilePath>$(UnitTestFxTrxLogFile)</UnitTestFxTrxPhysicalFilePath>
|
||||||
|
<UnitTestFxTrxPhysicalFilePath Condition="'$(HostMachineRepositoryRoot)' != ''">$(HostMachineRepositoryRoot)/artifacts/logs/SharedFx-UnitTests.trx</UnitTestFxTrxPhysicalFilePath>
|
||||||
|
|
||||||
<UnitTestFxTestProps>
|
<UnitTestFxTestProps>
|
||||||
DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath);
|
DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath);
|
||||||
DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath);
|
DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath);
|
||||||
|
|
@ -549,15 +550,21 @@
|
||||||
</UnitTestFxTestProps>
|
</UnitTestFxTestProps>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<MSBuild Projects="$(UnitTestFxProject)" Targets="Restore" Properties="_Dummy=restore;$(UnitTestFxTestProps)" />
|
<MSBuild Projects="$(UnitTestFxProject)" Targets="Restore" Properties="_Dummy=restore;$(UnitTestFxTestProps)" />
|
||||||
<MSBuild Projects="$(UnitTestFxProject)" Targets="VSTest" Properties="$(UnitTestFxTestProps)" />
|
<MSBuild Projects="$(UnitTestFxProject)" Targets="Build" Properties="$(UnitTestFxTestProps)">
|
||||||
<CallTarget Targets="ReportTestSharedFxTrx" />
|
<Output TaskParameter="TargetOutputs" ItemName="SharedFxTestAssembly" />
|
||||||
<OnError ExecuteTargets="ReportTestSharedFxTrx" />
|
</MSBuild>
|
||||||
</Target>
|
<RunDotNet Arguments="vstest;
|
||||||
|
--Framework:%(TargetFrameworkIdentifier),Version=v%(TargetFrameworkVersion);
|
||||||
|
--Logger:$([MSBuild]::Escape('trx;LogFileName=$(UnitTestFxTrxLogFile)'));
|
||||||
|
%(SharedFxTestAssembly.Identity);
|
||||||
|
--;RunConfiguration.NoAutoReporters=true" IgnoreExitCode="true">
|
||||||
|
<Output TaskParameter="ExitCode" PropertyName="VsTestExitCode" />
|
||||||
|
</RunDotNet>
|
||||||
|
|
||||||
<Target Name="ReportTestSharedFxTrx">
|
|
||||||
<Message Text="##teamcity[importData type='vstest' path='$(UnitTestFxTrxPhysicalFilePath)']"
|
<Message Text="##teamcity[importData type='vstest' path='$(UnitTestFxTrxPhysicalFilePath)']"
|
||||||
Importance="high"
|
Importance="High"
|
||||||
Condition=" '$(TEAMCITY_VERSION)' != '' AND Exists('$(UnitTestFxTrxLogFile)') "/>
|
Condition="'$(TEAMCITY_VERSION)' != '' AND Exists('$(UnitTestFxTrxLogFile)')" />
|
||||||
|
<Error Text="SharedFx.UnitTests failed with exit code '$(VsTestExitCode)'." Condition=" $(VsTestExitCode) != 0 " />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Assign this variable last because it may be updated from DotNetPackageVersionPropsPath as MicrosoftNETCoreAppPackageVersion. -->
|
<!-- Assign this variable last because it may be updated from DotNetPackageVersionPropsPath as MicrosoftNETCoreAppPackageVersion. -->
|
||||||
<MicrosoftNETCoreApp22PackageVersion Condition="'$(MicrosoftNETCoreAppPackageVersion)' != ''">$(MicrosoftNETCoreAppPackageVersion)</MicrosoftNETCoreApp22PackageVersion>
|
<MicrosoftNETCoreApp22PackageVersion Condition="'$(MicrosoftNETCoreAppPackageVersion)' != ''">$(MicrosoftNETCoreAppPackageVersion)</MicrosoftNETCoreApp22PackageVersion>
|
||||||
<MicrosoftNETCoreAppPackageVersion Condition="'$(MicrosoftNETCoreAppPackageVersion)' == ''">$(MicrosoftNETCoreApp22PackageVersion)</MicrosoftNETCoreAppPackageVersion>
|
|
||||||
|
|
||||||
<!-- Determined by build tools -->
|
<!-- Determined by build tools -->
|
||||||
<InternalAspNetCoreSdkPackageVersion>$(KoreBuildVersion)</InternalAspNetCoreSdkPackageVersion>
|
<InternalAspNetCoreSdkPackageVersion>$(KoreBuildVersion)</InternalAspNetCoreSdkPackageVersion>
|
||||||
|
|
|
||||||
|
|
@ -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"
|
|
||||||
|
|
|
||||||
|
|
@ -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)" \
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
</AssemblyAttribute>
|
</AssemblyAttribute>
|
||||||
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
|
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
|
||||||
<_Parameter1>MicrosoftNETCoreAppPackageVersion</_Parameter1>
|
<_Parameter1>MicrosoftNETCoreAppPackageVersion</_Parameter1>
|
||||||
<_Parameter2>$(MicrosoftNETCoreAppPackageVersion)</_Parameter2>
|
<_Parameter2>$(RuntimeFrameworkVersion)</_Parameter2>
|
||||||
</AssemblyAttribute>
|
</AssemblyAttribute>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue