|
261 | 261 |
|
262 | 262 | <!-- When we have <account>.visualstudio.com --> |
263 | 263 | <AzureDevOpsAccount Condition="$(CollectionUri.IndexOf('visualstudio.com')) >= 0">$(CollectionUri.Split('.')[0].Split('/')[2])</AzureDevOpsAccount> |
264 | | - |
265 | | - <!-- Directory where pdbs pointed in `FilesToPublishToSymbolServer` are copied before publishing to AzDO artifacts. --> |
266 | | - <PDBsToPublishTempLocation>$(ArtifactsTmpDir)PDBsToPublish/</PDBsToPublishTempLocation> |
267 | | - <PdbArtifactsSourceBuiltOrTempDir Condition="'$(PushToLocalStorage)' == 'true'">$(SourceBuiltPdbArtifactsDir)</PdbArtifactsSourceBuiltOrTempDir> |
268 | | - <PdbArtifactsSourceBuiltOrTempDir Condition="'$(PushToLocalStorage)' != 'true'">$(PDBsToPublishTempLocation)</PdbArtifactsSourceBuiltOrTempDir> |
| 264 | + </PropertyGroup> |
| 265 | + |
| 266 | + <!-- Asset output locations |
| 267 | + When V4 publishing is enabled, there are two primary scenarios: |
| 268 | + 1. The build is running as part of an inner build in the VMR, and the future artifacts location is NOT yet know. |
| 269 | + Publishing is primarily used to propagate assets between repos in a vertical. |
| 270 | + 2. Publishing at the end of a vertical, or the end of a normal build, where the future artifacts needs to be known. |
| 271 | + --> |
| 272 | + <PropertyGroup> |
| 273 | + <LocallyStageArtifacts>false</LocallyStageArtifacts> |
| 274 | + <LocallyStageArtifacts Condition="'$(PublishingVersion)' == '4' or '$(PushToLocalStorage)' == 'true'">true</LocallyStageArtifacts> |
269 | 275 |
|
270 | 276 | <!-- Use the SYSTEM_PHASENAME variable when available as that is guaranteed to be a unique identifier. |
271 | 277 | For local scenarios and when the variable isn't available, use "<os>-<arch>-<buildpass>"" as the manifest name. --> |
272 | 278 | <AssetManifestFileName Condition="'$(AssetManifestFileName)' == '' and '$(SYSTEM_PHASENAME)' != ''">$(SYSTEM_PHASENAME).xml</AssetManifestFileName> |
273 | 279 | <AssetManifestFileName Condition="'$(AssetManifestFileName)' == ''">$(AssetManifestOS)-$(AssetManifestArch)$(AssetManifestPass).xml</AssetManifestFileName> |
274 | 280 | <AssetManifestFilePath Condition="'$(AssetManifestFilePath)' == ''">$(ArtifactsLogDir)AssetManifest\$(AssetManifestFileName)</AssetManifestFilePath> |
275 | 281 |
|
| 282 | + <!-- PDBs are special in that they require a local staging location even if LocallyStageArtifacts is false.--> |
| 283 | + <PdbArtifactsLocalStorageDir Condition="'$(PdbArtifactsLocalStorageDir)' == '' and '$(LocallyStageArtifacts)' != 'true'">$(ArtifactsTmpDir)PDBsToPublish/</PdbArtifactsLocalStorageDir> |
| 284 | + </PropertyGroup> |
| 285 | + |
| 286 | + <!-- Set up local staging artifact paths if we're going to locally stage artifacts. |
| 287 | + NOTE! The SourceBuilt* setups can be removed after this change has flowed to the VMR and the bootstrap. |
| 288 | + arcade is updated. --> |
| 289 | + <PropertyGroup Condition="'$(LocallyStageArtifacts)' == 'true'"> |
| 290 | + <!-- Publish staging defaults. |
| 291 | + This is intended to be the location that a build will publish its pipeline artifacts. We avoid |
| 292 | + using the repo source layout for better compatibility with various scanning tools. |
| 293 | + Since not all CI builds are in AzDO, ensure that there is a reasonable default under the repo source layout. --> |
| 294 | + <ArtifactsPublishStagingDir Condition="'$(ArtifactsPublishStagingDir)' == '' and '$(Build_ArtifactStagingDirectory)' != ''">$([MSBuild]::NormalizeDirectory('$(Build_ArtifactStagingDirectory)', 'artifacts'))</ArtifactsPublishStagingDir> |
| 295 | + <ArtifactsPublishStagingDir Condition="'$(ArtifactsPublishStagingDir)' == ''">$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'staging'))</ArtifactsPublishStagingDir> |
| 296 | + |
| 297 | + <!-- Directory where pdbs pointed in `FilesToPublishToSymbolServer` are copied during publishing. --> |
| 298 | + <PdbArtifactsLocalStorageDir Condition="'$(PdbArtifactsLocalStorageDir)' == ''">$(SourceBuiltPdbArtifactsDir)</PdbArtifactsLocalStorageDir> |
| 299 | + <PdbArtifactsLocalStorageDir Condition="'$(PdbArtifactsLocalStorageDir)' == ''">$(ArtifactsPublishStagingDir)pdbs</PdbArtifactsLocalStorageDir> |
| 300 | + |
| 301 | + <!-- Directory where shipping packages are copied during publishing. --> |
| 302 | + <ShippingPackagesLocalStorageDir Condition="'$(ShippingPackagesLocalStorageDir)' == ''">$(SourceBuiltShippingPackagesDir)</ShippingPackagesLocalStorageDir> |
| 303 | + <ShippingPackagesLocalStorageDir Condition="'$(ShippingPackagesLocalStorageDir)' == ''">$(ArtifactsPublishStagingDir)packages/shipping</ShippingPackagesLocalStorageDir> |
| 304 | + |
| 305 | + <!-- Directory where nonshipping packages are copied during publishing. --> |
| 306 | + <NonShippingPackagesLocalStorageDir Condition="'$(NonShippingPackagesLocalStorageDir)' == ''">$(SourceBuiltShippingPackagesDir)</NonShippingPackagesLocalStorageDir> |
| 307 | + <NonShippingPackagesLocalStorageDir Condition="'$(NonShippingPackagesLocalStorageDir)' == ''">$(ArtifactsPublishStagingDir)packages/nonshipping</NonShippingPackagesLocalStorageDir> |
| 308 | + |
| 309 | + <!-- Directory where asset manifests are copied during publishing. --> |
| 310 | + <AssetManifestsLocalStorageDir Condition="'$(AssetManifestsLocalStorageDir)' == ''">$(SourceBuiltAssetManifestsDir)</AssetManifestsLocalStorageDir> |
| 311 | + <AssetManifestsLocalStorageDir Condition="'$(AssetManifestsLocalStorageDir)' == ''">$(ArtifactsPublishStagingDir)manifests</AssetManifestsLocalStorageDir> |
| 312 | + |
| 313 | + <!-- Directory where blob assets are copied during publishing. --> |
| 314 | + <AssetsLocalStorageDir Condition="'$(AssetsLocalStorageDir)' == ''">$(SourceBuiltAssetsDir)</AssetsLocalStorageDir> |
| 315 | + <AssetsLocalStorageDir Condition="'$(AssetsLocalStorageDir)' == ''">$(ArtifactsPublishStagingDir)assets</AssetsLocalStorageDir> |
| 316 | + |
| 317 | + <!-- Default values for the future artifact name and publish locations if not provided. |
| 318 | + VMR builds would typically specify these globally. Only used when publishing V4 is active. --> |
| 319 | + <FutureArtifactName Condition="'$(PublishingVersion)' == '4' and '$(FutureArtifactName)' == '' and '$(SYSTEM_PHASENAME)' != ''">$(SYSTEM_PHASENAME)_Artifacts</FutureArtifactName> |
| 320 | + <FutureArtifactName Condition="'$(PublishingVersion)' == '4' and '$(FutureArtifactName)' == ''">$(AssetManifestOS)_$(AssetManifestArch)$(AssetManifestPass)_Artifacts</FutureArtifactName> |
| 321 | + <FutureArtifactPublishBasePath Condition="'$(PublishingVersion)' == '4' and '$(FutureArtifactPublishBasePath)' == ''">$(ArtifactsPublishStagingDir)</FutureArtifactPublishBasePath> |
276 | 322 | </PropertyGroup> |
277 | 323 |
|
278 | 324 | <!-- |
|
382 | 428 | AssetManifestPath="$(AssetManifestFilePath)" |
383 | 429 | IsReleaseOnlyPackageVersion="$(IsReleaseOnlyPackageVersion)" |
384 | 430 | PushToLocalStorage="$(PushToLocalStorage)" |
385 | | - AssetsLocalStorageDir="$(SourceBuiltAssetsDir)" |
| 431 | + AssetsLocalStorageDir="$(AssetsLocalStorageDir)" |
386 | 432 | PreserveRepoOrigin="$(PreserveRepoOrigin)" |
387 | | - ShippingPackagesLocalStorageDir="$(SourceBuiltShippingPackagesDir)" |
388 | | - NonShippingPackagesLocalStorageDir="$(SourceBuiltNonShippingPackagesDir)" |
389 | | - AssetManifestsLocalStorageDir="$(SourceBuiltAssetManifestsDir)" |
390 | | - PdbArtifactsLocalStorageDir="$(PdbArtifactsSourceBuiltOrTempDir)" |
| 433 | + ShippingPackagesLocalStorageDir="$(ShippingPackagesLocalStorageDir)" |
| 434 | + NonShippingPackagesLocalStorageDir="$(NonShippingPackagesLocalStorageDir)" |
| 435 | + AssetManifestsLocalStorageDir="$(AssetManifestsLocalStorageDir)" |
| 436 | + PdbArtifactsLocalStorageDir="$(PdbArtifactsLocalStorageDir)" |
391 | 437 | ArtifactVisibilitiesToPublish="@(ArtifactVisibilityToPublish)" |
392 | 438 | UseHardlinksIfPossible="$(PublishingUseHardlinksIfPossible)" |
393 | | - PublishManifestOnly="$(PublishManifestOnly)" /> |
| 439 | + FutureArtifactName="$(FutureArtifactName)" |
| 440 | + FutureArtifactPublishBasePath="$(FutureArtifactPublishBasePath)" /> |
394 | 441 | </Target> |
395 | 442 |
|
396 | 443 | </Project> |
0 commit comments