Skip to content

Commit ddf02e7

Browse files
radicalCopilot
andcommitted
Download native archives and gate URL validation on publishing branches
The Prepare Installers stage now downloads CLI native archives from the pipeline artifacts so WinGet/Homebrew manifest generation can compute hashes locally (archiveRoot). URL validation and install tests are gated on whether the build is on a branch where Arcade's darc publish will upload CLI archives to ci.dot.net (main, release/*, internal/release/*). Feature branches and PR builds skip URL validation since no blobs will be published. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 803a364 commit ddf02e7

1 file changed

Lines changed: 24 additions & 4 deletions

File tree

eng/pipelines/azure-pipelines.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,26 @@ extends:
415415
steps:
416416
- checkout: self
417417
fetchDepth: 1
418+
- task: DownloadPipelineArtifact@2
419+
displayName: 🟣Download CLI archives
420+
inputs:
421+
itemPattern: |
422+
**/aspire-cli-*.zip
423+
targetPath: '$(Pipeline.Workspace)/native-archives'
418424
- template: /eng/pipelines/templates/prepare-winget-manifest.yml@self
419425
parameters:
420426
version: $(aspireVersion)
421427
artifactVersion: $(aspireArtifactVersion)
422428
channel: $(installerChannel)
423-
skipUrlValidation: ${{ or(eq(variables['_RunAsPublic'], 'true'), eq(variables['Build.Reason'], 'PullRequest')) }}
424-
runInstallTest: ${{ and(ne(variables['_RunAsPublic'], 'true'), ne(variables['Build.Reason'], 'PullRequest')) }}
429+
archiveRoot: $(Pipeline.Workspace)/native-archives
430+
# Skip URL validation and install tests unless this is a build on a
431+
# publishing branch (main, release/*, internal/release/*) where darc
432+
# publishes CLI archives to ci.dot.net. Feature branches and PR builds
433+
# don't have Maestro default channels so URLs won't be valid.
434+
# NOTE: ${{ not() }} is NOT supported in AzDO template expressions,
435+
# so we use De Morgan's law to negate the runInstallTest condition.
436+
skipUrlValidation: ${{ or(eq(variables['_RunAsPublic'], 'true'), eq(variables['Build.Reason'], 'PullRequest'), and(ne(variables['Build.SourceBranch'], 'refs/heads/main'), eq(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), false), eq(startsWith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), false))) }}
437+
runInstallTest: ${{ and(ne(variables['_RunAsPublic'], 'true'), ne(variables['Build.Reason'], 'PullRequest'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'))) }}
425438

426439
- job: Homebrew
427440
displayName: Homebrew Cask
@@ -434,9 +447,16 @@ extends:
434447
steps:
435448
- checkout: self
436449
fetchDepth: 1
450+
- task: DownloadPipelineArtifact@2
451+
displayName: 🟣Download CLI archives
452+
inputs:
453+
itemPattern: |
454+
**/aspire-cli-*.tar.gz
455+
targetPath: '$(Pipeline.Workspace)/native-archives'
437456
- template: /eng/pipelines/templates/prepare-homebrew-cask.yml@self
438457
parameters:
439458
version: $(aspireVersion)
440459
artifactVersion: $(aspireArtifactVersion)
441-
skipUrlValidation: ${{ or(eq(variables['_RunAsPublic'], 'true'), eq(variables['Build.Reason'], 'PullRequest')) }}
442-
runInstallTest: ${{ and(ne(variables['_RunAsPublic'], 'true'), ne(variables['Build.Reason'], 'PullRequest')) }}
460+
archiveRoot: $(Pipeline.Workspace)/native-archives
461+
skipUrlValidation: ${{ or(eq(variables['_RunAsPublic'], 'true'), eq(variables['Build.Reason'], 'PullRequest'), and(ne(variables['Build.SourceBranch'], 'refs/heads/main'), eq(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), false), eq(startsWith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), false))) }}
462+
runInstallTest: ${{ and(ne(variables['_RunAsPublic'], 'true'), ne(variables['Build.Reason'], 'PullRequest'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'))) }}

0 commit comments

Comments
 (0)