|
35 | 35 | <DotNetCliChannel>Current</DotNetCliChannel> |
36 | 36 |
|
37 | 37 | <!-- Similar to ProjectLayout.props in the Arcade SDK. The Helix SDK contains nothing similar. --> |
38 | | - <OutputPath Condition=" '$(OutputPath)' == '' ">$(RepoRoot)artifacts\bin\$(MSBuildProjectName)\</OutputPath> |
| 38 | + <OutputPath Condition=" '$(OutputPath)' == '' " |
| 39 | + >$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', '$(MSBuildProjectName)'))</OutputPath> |
39 | 40 | </PropertyGroup> |
40 | 41 |
|
41 | 42 | <!-- Specify the .NET runtime we need which will be included as a correlation payload. --> |
|
52 | 53 | <When Condition=" '$(ContinuousIntegrationBuild)' == 'true' "> |
53 | 54 | <PropertyGroup> |
54 | 55 | <!-- Creator is not valid for internal queues --> |
55 | | - <Creator Condition="'$(_UseHelixOpenQueues)' == 'true'">aspnetcore</Creator> |
| 56 | + <Creator Condition=" '$(_UseHelixOpenQueues)' == 'true' ">aspnetcore</Creator> |
56 | 57 |
|
57 | 58 | <HelixType>ci</HelixType> |
58 | 59 | <HelixBuild>$(BUILD_BUILDNUMBER).$(SYSTEM_JOBATTEMPT)</HelixBuild> |
|
61 | 62 | <Otherwise> |
62 | 63 | <PropertyGroup> |
63 | 64 | <!-- Creator is not valid for internal queues --> |
64 | | - <Creator Condition="'$(_UseHelixOpenQueues)' == 'true'">$(USERNAME)</Creator> |
65 | | - <Creator Condition="'$(USERNAME)' == '' AND '$(_UseHelixOpenQueues)' == 'true'">$(USER)</Creator> |
| 65 | + <Creator Condition=" '$(_UseHelixOpenQueues)' == 'true' ">$(USERNAME)</Creator> |
| 66 | + <Creator Condition=" '$(_UseHelixOpenQueues)' == 'true' AND '$(USERNAME)' == '' ">$(USER)</Creator> |
66 | 67 |
|
67 | 68 | <HelixType>dev</HelixType> |
68 | 69 | <HelixBuild>$([System.DateTime]::Now.ToString('yyyyMMddHHmm'))</HelixBuild> |
|
83 | 84 | <HelixProperties Condition="'$(RunQuarantinedTests)' != 'true'" Include="runType" Value="unquarantined" /> |
84 | 85 | </ItemGroup> |
85 | 86 |
|
86 | | - <Target Name="IncludeAspNetRuntime" BeforeTargets="Gather" |
87 | | - Condition="'$(DoNotRequireSharedFxHelix)' != 'true' OR |
88 | | - EXISTS('$(RepoRoot)artifacts\packages\$(Configuration)\Shipping\Microsoft.AspNetCore.App.Runtime.$(TargetRuntimeIdentifier).$(SharedFxVersion).nupkg')"> |
| 87 | + <!-- |
| 88 | + In inner (per-queue) builds, tell the Helix SDK to pack up our just-built App.Ref / App.Runtime layouts w/ |
| 89 | + the current versions. Warning: When using RunHelix.ps1, .dotnet/ folder may contain older App.Ref and |
| 90 | + App.Runtime layouts. |
| 91 | + --> |
| 92 | + <Target Name="IncludeAspNetRuntime" BeforeTargets="Gather"> |
89 | 93 | <MSBuild Projects="$(RepoRoot)src\Framework\App.Runtime\src\Microsoft.AspNetCore.App.Runtime.csproj" |
90 | 94 | Properties="DisableYarnCheck=true;ExcludeFromBuild=false" |
91 | 95 | Targets="_GetPackageVersionInfo"> |
|
94 | 98 |
|
95 | 99 | <PropertyGroup> |
96 | 100 | <SharedFxVersion>@(_ResolvedProductVersionInfo->'%(PackageVersion)')</SharedFxVersion> |
| 101 | + <_AppRefSubPath>$([System.IO.Path]::Combine('packs', 'Microsoft.AspNetCore.App.Ref', '$(SharedFxVersion)'))</_AppRefSubPath> |
| 102 | + <_AppRuntimeSubPath>$([System.IO.Path]::Combine('shared', 'Microsoft.AspNetCore.App', '$(SharedFxVersion)'))</_AppRuntimeSubPath> |
| 103 | + <_AppRefPath>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', '.dotnet', '$(_AppRefSubPath)'))</_AppRefPath> |
| 104 | + <_AppRuntimePath>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', '.dotnet', '$(_AppRuntimeSubPath)'))</_AppRuntimePath> |
| 105 | + |
| 106 | + <!-- |
| 107 | + Don't bother checking for App.Runtime layout because we want both and App.Ref project depends on the |
| 108 | + App.Runtime project. |
| 109 | + --> |
| 110 | + <_AppRefPathExists Condition=" EXISTS('$(_AppRefPath)') ">true</_AppRefPathExists> |
| 111 | + <_AppRefPathExists Condition=" '$(_AppRefPathExists)' == '' ">false</_AppRefPathExists> |
97 | 112 | </PropertyGroup> |
98 | 113 |
|
99 | | - <!-- Use package because .dotnet/ folder doesn't contain RuntimeList.xml file and SharedFxTests checks that. --> |
100 | | - <Unzip |
101 | | - SourceFiles="$(RepoRoot)artifacts\packages\$(Configuration)\Shipping\Microsoft.AspNetCore.App.Runtime.$(TargetRuntimeIdentifier).$(SharedFxVersion).nupkg" |
102 | | - DestinationFolder="$(OutputPath)\SharedFx.Unzip" /> |
103 | | - <ItemGroup> |
104 | | - <_appRuntimeFiles Include="$(OutputPath)\SharedFx.Unzip\**\*.txt" /> |
105 | | - <_appRuntimeFiles Include="$(OutputPath)\SharedFx.Unzip\**\*.json" /> |
106 | | - <_appRuntimeFiles Include="$(OutputPath)\SharedFx.Unzip\**\*.dll" /> |
107 | | - <_appRuntimeFiles Include="$(OutputPath)\SharedFx.Unzip\**\RuntimeList.xml" /> |
108 | | - </ItemGroup> |
109 | | - <Copy SourceFiles="@(_appRuntimeFiles)" |
110 | | - DestinationFolder="$(OutputPath)\SharedFx.Layout\shared\Microsoft.AspNetCore.App\$(SharedFxVersion)" /> |
111 | | - <Copy SourceFiles="$(OutputPath)\SharedFx.Unzip\Microsoft.AspNetCore.App.versions.txt" |
112 | | - DestinationFiles="$(OutputPath)\SharedFx.Layout\shared\Microsoft.AspNetCore.App\$(SharedFxVersion)\.version" /> |
113 | | - |
114 | | - <Unzip Condition="Exists('$(RepoRoot)artifacts\packages\$(Configuration)\Shipping\Microsoft.AspNetCore.App.Ref.$(SharedFxVersion).nupkg')" |
115 | | - SourceFiles="$(RepoRoot)artifacts\packages\$(Configuration)\Shipping\Microsoft.AspNetCore.App.Ref.$(SharedFxVersion).nupkg" |
116 | | - DestinationFolder="$(OutputPath)\SharedFx.Layout\packs\Microsoft.AspNetCore.App.Ref\$(SharedFxVersion)" /> |
117 | | - <ZipDirectory Condition="Exists('$(OutputPath)\SharedFx.Layout')" |
118 | | - SourceDirectory="$(OutputPath)\SharedFx.Layout" |
119 | | - DestinationFile="$(OutputPath)\SharedFx.Layout.zip" Overwrite="true" /> |
120 | | - |
121 | | - <ItemGroup> |
122 | | - <HelixCorrelationPayload Include="$(OutputPath)\SharedFx.Layout.zip" Destination="$(DotNetCliDestination)" /> |
| 114 | + <!-- After complaining about missing App.Ref layout, do nothing else in this target. --> |
| 115 | + <Message Importance="High" |
| 116 | + Text="Targeting path location '$(_AppRefPath)' does not exist and tests will use the SDK's bundled runtimes and targeting pack." |
| 117 | + Condition=" !$(_AppRefPathExists) AND '$(DoNotRequireSharedFxHelix)' == true " /> |
| 118 | + <Error Text="Targeting path location '$(_AppRefPath)' does not exist and some tests are guaranteed to fail." |
| 119 | + Condition=" !$(_AppRefPathExists) AND '$(DoNotRequireSharedFxHelix)' != true " /> |
| 120 | + |
| 121 | + <!-- Grab only the portions of the .dotnet/ tree built in this run and have Helix zip that up. --> |
| 122 | + <ItemGroup Condition=" $(_AppRefPathExists) "> |
| 123 | + <HelixCorrelationPayload Include="$(_AppRefPath)" |
| 124 | + Condition=" $(IsWindowsHelixQueue) " |
| 125 | + Destination="$(DotNetCliDestination)\$(_AppRefSubPath)" /> |
| 126 | + <HelixCorrelationPayload Include="$(_AppRefPath)" |
| 127 | + Condition=" !$(IsWindowsHelixQueue) " |
| 128 | + Destination="$(DotNetCliDestination)/$(_AppRefSubPath.Replace('\','/'))" /> |
| 129 | + <HelixCorrelationPayload Include="$(_AppRuntimePath)" |
| 130 | + Condition=" $(IsWindowsHelixQueue) " |
| 131 | + Destination="$(DotNetCliDestination)\$(_AppRuntimeSubPath)" /> |
| 132 | + <HelixCorrelationPayload Include="$(_AppRuntimePath)" |
| 133 | + Condition=" !$(IsWindowsHelixQueue) " |
| 134 | + Destination="$(DotNetCliDestination)/$(_AppRuntimeSubPath.Replace('\','/'))" /> |
123 | 135 | </ItemGroup> |
124 | 136 | </Target> |
125 | 137 |
|
|
0 commit comments