Skip to content

Commit 6a9fe05

Browse files
authored
Consume shared components from external URI in non-1xx feature band (#49607)
1 parent 480b58f commit 6a9fe05

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/Layout/redist/targets/RestoreLayout.targets

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,13 @@
304304
</UrisToDownload>
305305
</ItemGroup>
306306

307-
<!-- If building in product source build mode, there is no need to attempt the external URIs. These are not desired,
308-
and won't work anyway because the source build file URI doesn't use the same structure as the storage accounts.
309-
For example, the dotnetbuilds uri for 'file:///vmr/dotnet2/artifacts/obj/x64/Release/blob-feed/assets//aspnetcore_base_runtime.version'
310-
would end up 'https://ci.dot.net/public//dotnet-runtime-8.0.0-rc.1.23381.3-centos.8-x64.tar.gz'. This is
311-
missing the runtime version number directory. -->
312-
<ItemGroup Condition="'$(DotNetBuildFromVMR)' != 'true'">
307+
<!--
308+
Only access external URIs if building the repo outside the context of the VMR or if building a non-1xx feature band.
309+
For VMR builds in the 1xx feature band, we want to use the locally built artifacts produced by repos built earlier in the build.
310+
But in later feature bands, we need to download the artifacts since the current build did not produce them. They were only produced
311+
by builds of the 1xx feature band and are being shared with other feature bands through this download workflow.
312+
-->
313+
<ItemGroup Condition="'$(DotNetBuildFromVMR)' != 'true' or '$(VersionSDKMinor)' != '1'">
313314
<UrisToDownload Include="$([System.String]::Copy('%(ComponentToDownload.BaseUrl)').Replace($(PublicBaseURL), 'https://ci.dot.net/public/'))/%(ComponentToDownload.DownloadFileName)"
314315
Condition="'%(ComponentToDownload.ShouldDownload)' == 'true'">
315316
<ShouldDownload>%(ComponentToDownload.ShouldDownload)</ShouldDownload>

0 commit comments

Comments
 (0)