|
1 |
| -<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test"> |
| 1 | +<Project Sdk="Microsoft.DotNet.Helix.Sdk" InitialTargets="InstallDotNet;BuildProjects;Test"> |
2 | 2 | <PropertyGroup>
|
3 | 3 | <HelixSource Condition=" '$(RunAsPublic)' == 'true' ">pr/dotnet/wcf/$(BUILD_SOURCEBRANCH)/</HelixSource>
|
4 | 4 | <HelixSource Condition=" '$(RunAsInternal)' == 'true' ">official/dotnet/wcf/$(BUILD_SOURCEBRANCH)/</HelixSource>
|
5 | 5 | <HelixType>test/product/</HelixType>
|
6 | 6 | <HelixBuild>$(BUILD_BUILDNUMBER)</HelixBuild>
|
7 | 7 | <HelixBuild Condition="'$(HelixBuild)' == ''">123460.01</HelixBuild>
|
8 |
| - <DotNetCliPackageType>sdk</DotNetCliPackageType> |
9 |
| - <DotNetCliVersion>8.0.100</DotNetCliVersion> |
10 |
| - <IncludeDotNetCli>true</IncludeDotNetCli> |
11 | 8 |
|
| 9 | + <!-- Read global.json so we know the version of the dotnet cli we need --> |
| 10 | + <GlobalJsonContent>$([System.IO.File]::ReadAllText('$(RepoRoot)global.json'))</GlobalJsonContent> |
| 11 | + <DotNetCliPackageType>sdk</DotNetCliPackageType> |
| 12 | + <DotNetCliVersion>$([System.Text.RegularExpressions.Regex]::Match($(GlobalJsonContent), '(%3F<="dotnet": ").*(%3F=")'))</DotNetCliVersion> |
| 13 | + |
| 14 | + <IncludeDotNetCli>true</IncludeDotNetCli> |
12 | 15 | <EnableAzurePipelinesReporter>true</EnableAzurePipelinesReporter>
|
13 | 16 | <TestRunNamePrefix>$(AGENT_JOBNAME)</TestRunNamePrefix>
|
14 |
| - |
15 | 17 | <EnableXUnitReporter>true</EnableXUnitReporter>
|
16 | 18 | </PropertyGroup>
|
17 |
| - |
| 19 | + |
| 20 | + <Target Name="InstallDotNet"> |
| 21 | + <ItemGroup> |
| 22 | + <AdditionalDotNetPackage Include="8.0.8"> |
| 23 | + <PackageType>aspnetcore-runtime</PackageType> |
| 24 | + <Channel>Current</Channel> |
| 25 | + </AdditionalDotNetPackage> |
| 26 | + </ItemGroup> |
| 27 | + </Target> |
| 28 | + |
| 29 | + <Target Name="BuildProjects"> |
| 30 | + <MSBuild Targets="Restore;Publish" Projects="..\src\System.Private.ServiceModel\tools\SelfHostedCoreWcfService\SelfHostedCoreWCFService.csproj"/> |
| 31 | + </Target> |
| 32 | + |
18 | 33 | <ItemGroup>
|
19 | 34 | <XUnitProject Include="..\src\System.Private.ServiceModel\tests\Scenarios\**\*.IntegrationTests.csproj">
|
20 | 35 | <TargetFramework>$(XUnitPublishTargetFramework)</TargetFramework>
|
|
53 | 68 | <Creator>$(BUILD_SOURCEVERSIONAUTHOR)</Creator>
|
54 | 69 | <Creator Condition=" '$(Creator)' == ''">anon</Creator>
|
55 | 70 | </PropertyGroup>
|
56 |
| - |
57 |
| - <PropertyGroup Condition="!$(HelixTargetQueue.StartsWith('Windows'))"> |
| 71 | + |
| 72 | + <PropertyGroup> |
| 73 | + <RunWithCoreWCFService Condition="'$(RunWithCoreWCFService)' == ''">false</RunWithCoreWCFService> |
| 74 | + </PropertyGroup> |
| 75 | + |
| 76 | + <PropertyGroup Condition="'$(TestJob)' != 'Windows'" > |
58 | 77 | <HelixPreCommands>$(HelixPreCommands);chmod a+x $HELIX_CORRELATION_PAYLOAD/InstallRootCertificate.sh</HelixPreCommands>
|
59 | 78 | <HelixPreCommands>$(HelixPreCommands);sudo -E -n $HELIX_CORRELATION_PAYLOAD/InstallRootCertificate.sh --service-host $(ServiceHost) --cert-file /tmp/wcfrootca.crt</HelixPreCommands>
|
60 | 79 | </PropertyGroup>
|
61 | 80 |
|
62 |
| - <Target Name="Pack"/> |
| 81 | + <PropertyGroup Condition="'$(TestJob)' == 'Windows' AND '$(RunWithCoreWCFService)' == 'true'"> |
| 82 | + <HelixPreCommands>$(HelixPreCommands);set PATH=%HELIX_CORRELATION_PAYLOAD%\dotnet-cli%3B%PATH%</HelixPreCommands> |
| 83 | + <!-- %3B is an escaped ; --> |
| 84 | + <HelixPreCommands>$(HelixPreCommands);set DOTNET_ROOT=%HELIX_CORRELATION_PAYLOAD%\dotnet-cli;set DOTNET_CLI_TELEMETRY_OPTOUT=1</HelixPreCommands> |
| 85 | + <HelixPreCommands>$(HelixPreCommands);set DOTNET_CLI_HOME=%HELIX_WORKITEM_ROOT%\.dotnet</HelixPreCommands> |
| 86 | + <HelixPreCommands>$(HelixPreCommands);set NUGET_PACKAGES=%HELIX_WORKITEM_ROOT%\.nuget</HelixPreCommands> |
| 87 | + <HelixPreCommands>$(HelixPreCommands);set ServiceUri=localhost</HelixPreCommands> |
| 88 | + <HelixPreCommands>$(HelixPreCommands);set RunWithCoreWCF=true</HelixPreCommands> |
| 89 | + <HelixPreCommands>$(HelixPreCommands);%HELIX_CORRELATION_PAYLOAD%\SelfHostedCoreWCFService\$(Configuration)\net8.0\SelfHostedCoreWCFService bootstrap:true</HelixPreCommands> |
| 90 | + </PropertyGroup> |
| 91 | + |
| 92 | + <PropertyGroup Condition="'$(TestJob)' != 'Windows' AND '$(RunWithCoreWCFService)' == 'true'"> |
| 93 | + <HelixPreCommands>$(HelixPreCommands);export PATH=$HELIX_CORRELATION_PAYLOAD/dotnet-cli:$PATH</HelixPreCommands> |
| 94 | + <HelixPreCommands>$(HelixPreCommands);export DOTNET_ROOT=$HELIX_CORRELATION_PAYLOAD/dotnet-cli;export DOTNET_CLI_TELEMETRY_OPTOUT=1</HelixPreCommands> |
| 95 | + <HelixPreCommands>$(HelixPreCommands);export DOTNET_CLI_HOME=$HELIX_WORKITEM_ROOT/.dotnet</HelixPreCommands> |
| 96 | + <HelixPreCommands>$(HelixPreCommands);export NUGET_PACKAGES=$HELIX_WORKITEM_ROOT/.nuget</HelixPreCommands> |
| 97 | + <HelixPreCommands>$(HelixPreCommands);export ServiceUri=localhost</HelixPreCommands> |
| 98 | + <HelixPreCommands>$(HelixPreCommands);export RunWithCoreWCF=true</HelixPreCommands> |
| 99 | + <HelixPreCommands>$(HelixPreCommands);dotnet exec --roll-forward Major $HELIX_CORRELATION_PAYLOAD/SelfHostedCoreWCFService/$(Configuration)/net8.0/SelfHostedCoreWCFService.dll bootstrap:true</HelixPreCommands> |
| 100 | + </PropertyGroup> |
63 | 101 |
|
64 | 102 | <ItemGroup>
|
65 | 103 | <!-- Directory that is zipped up and sent as a correlation payload to Helix -->
|
66 | 104 | <HelixCorrelationPayload Include="$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\src\System.Private.ServiceModel\tools\scripts'))" >
|
67 | 105 | <PayloadDirectory>%(Identity)</PayloadDirectory>
|
68 | 106 | </HelixCorrelationPayload>
|
| 107 | + |
| 108 | + <HelixCorrelationPayload Include="$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\artifacts\bin\SelfHostedCoreWCFService'))" > |
| 109 | + <Destination>SelfHostedCoreWCFService</Destination> |
| 110 | + </HelixCorrelationPayload> |
69 | 111 | </ItemGroup>
|
70 | 112 |
|
71 | 113 | <PropertyGroup>
|
|
0 commit comments