Add canary pipeline for azure-dev cli - #9994
Add canary pipeline for azure-dev cli#9994Chidozie Ononiwu (chidozieononiwu) wants to merge 2 commits into
Conversation
🔗 Linked Issue RequiredThanks for the contribution! Please link a GitHub issue to this PR by adding |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 21 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
49256f3 to
fd5b68d
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The default release mode disables existing automatic publishing paths and can unintentionally publish canaries.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a canary publishing mode for isolated CLI release artifacts and credential validation.
Changes:
- Adds standard/canary release selection.
- Publishes canary artifacts to build-specific storage.
- Validates WinGet credentials without production submission.
File summaries
| File | Description |
|---|---|
eng/pipelines/release-cli.yml |
Selects standard or canary publishing. |
eng/pipelines/templates/stages/publish.yml |
Implements canary publication and skips production stages. |
eng/pipelines/templates/steps/publish-cli-winget.yml |
Adds token-only validation mode. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
fd5b68d to
df9721e
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The Canary default currently removes existing publication stages from automatic CI and pull-request runs.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
eng/pipelines/release-cli.yml:149
- The
Canarydefault makes every automatically triggered CI/PR run fail this condition, sopublish.ymlis omitted entirely. That removes the existing main-branch daily publication and PR artifact/comment stages; automatic triggers cannot choose a runtime parameter. Keep the standard template path for CI/PR reasons and gate only manual standard releases onReleaseMode.
- ${{ if and(eq(parameters.ReleaseMode, 'Standard'), in(variables['Build.Reason'], 'Manual', 'IndividualCI', 'BatchedCI', 'PullRequest')) }}:
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Balanced
| dependsOn: Sign | ||
| dependsOn: | ||
| - Sign | ||
| - ${{ if eq(parameters.ReleaseMode, 'Canary') }}: |
There was a problem hiding this comment.
For test scenarios, only depend on Sign. Then have all of the stages not run (just exclude their jobs entirely in the template).
Then selectively include the scenario you want to test. Comment out dependencies on things like Publish_Release so that it runs properly. In those comments set a TODO reminder so you don't forget to keep the dependencies.
Make sure publishing doesn't run (in the case of wingetcreate.exe, do NOT set --submit)
df9721e to
14f355b
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Canary artifacts are not published, and the default mode disables existing CI and PR publication paths.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
eng/pipelines/release-cli.yml:149
- Automated main and pull-request runs use the default
ReleaseMode: Canary, so neither branch includespublish.yml; this removes the existing daily and PR artifact publishing stages. KeepReleaseModeas the manual-production guard, but include the Standard publish template unconditionally for CI/PR reasons.
- ${{ if and(eq(parameters.ReleaseMode, 'Standard'), in(variables['Build.Reason'], 'Manual', 'IndividualCI', 'BatchedCI', 'PullRequest')) }}:
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Balanced
| condition: >- | ||
| and( | ||
| succeeded(), | ||
| eq('${{ parameters.ReleaseMode }}', 'Standard'), |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
bad98de to
70b73d9
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Automatic publishing, standard WinGet submission, and the described canary artifact publication are currently broken or missing.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
eng/pipelines/templates/stages/publish.yml:37
Canarydisables this only artifact-publishing deployment, while no replacement job consumestest-hostingor invokespublish-cli.ymlfor an isolated destination; the remaining canary job only reads the WinGet repository. A manual canary run therefore publishes no canary artifacts or URL, contrary to the PR description. Add the non-production canary upload path, or redefine the change as validation-only.
eq('${{ parameters.ReleaseMode }}', 'Standard'),
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Balanced
| - ${{ if and(eq(parameters.ReleaseMode, 'Standard'), in(variables['Build.Reason'], 'Manual', 'IndividualCI', 'BatchedCI', 'PullRequest')) }}: | ||
| - template: /eng/pipelines/templates/stages/publish.yml |
| - ${{ else }}: | ||
| #- pwsh: | | ||
| # $PSNativeCommandArgumentPassing = 'Legacy' | ||
| # Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe | ||
| # | ||
| # $AdditionalArgs = "" | ||
| # if ($$(SubmitWinGetPackage)) { | ||
| # $AdditionalArgs = "--submit" | ||
| # } | ||
| # | ||
| # ./wingetcreate.exe update ` | ||
| # Microsoft.Azd ` | ||
| # --version '$(MSI_VERSION)' ` | ||
| # --urls "https://github.com/Azure/azure-dev/releases/download/azure-dev-cli_$(CLI_VERSION)/azd-windows-amd64.msi" ` | ||
| # --token ${{ parameters.GitHubToken }} ` | ||
| # --out winget ` | ||
| # $AdditionalArgs | ||
| # displayName: Submit to WinGet |
There was a problem hiding this comment.
🟡 Changes recommended
Automatic CI/PR publishing and Standard WinGet publication are disabled, while Canary mode does not publish its promised artifacts.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
eng/pipelines/release-cli.yml:150
- Automatic
mainand PR runs use theCanarydefault, but this condition excludes them from the Standard branch and the Canary branch below accepts only manual runs. Consequentlypublish.ymlis never loaded for CI/PR, removing the existing daily and PR artifact publishing. Keep CI/PR inclusion independent ofReleaseModeand apply the mode only to manual runs.
- ${{ if and(eq(parameters.ReleaseMode, 'Standard'), in(variables['Build.Reason'], 'Manual', 'IndividualCI', 'BatchedCI', 'PullRequest')) }}:
- template: /eng/pipelines/templates/stages/publish.yml
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Balanced
| # - ${{ else }}: | ||
| # - pwsh: | | ||
| # $PSNativeCommandArgumentPassing = 'Legacy' | ||
| # Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe | ||
| # | ||
| # $AdditionalArgs = "" | ||
| # if ($$(SubmitWinGetPackage)) { | ||
| # $AdditionalArgs = "--submit" | ||
| # } | ||
| # | ||
| # ./wingetcreate.exe update ` | ||
| # Microsoft.Azd ` | ||
| # --version '$(MSI_VERSION)' ` | ||
| # --urls "https://github.com/Azure/azure-dev/releases/download/azure-dev-cli_$(CLI_VERSION)/azd-windows-amd64.msi" ` | ||
| # --token ${{ parameters.GitHubToken }} ` | ||
| # --out winget ` | ||
| # $AdditionalArgs | ||
| # displayName: Submit to WinGet |
| - ${{ if and(eq(parameters.ReleaseMode, 'Canary'), eq(variables['Build.Reason'], 'Manual')) }}: | ||
| - template: /eng/pipelines/templates/stages/publish.yml | ||
| parameters: | ||
| ReleaseMode: Canary |
This pull request introduces a new "Canary" release mode to the CLI release pipeline, allowing for differentiated handling of standard and canary releases. The changes add parameters and conditional logic to the pipeline and publish templates, ensuring that canary builds are published only on manual runs, use different artifacts, and skip production publishing steps. Additionally, validation steps are added for canary releases.
Release pipeline enhancements:
ReleaseModeparameter (with valuesStandardandCanary) torelease-cli.ymlandpublish.yml, enabling selection between standard and canary release workflows. [1] [2]Verify_Installersjob and publish to a separate location with a unique URL, while skipping production environments and outputs. [1] [2] [3] [4]Step and artifact handling:
Validation improvements:
ValidationModeparameter to thepublish-cli-winget.ymltemplate, allowing canary releases to validate the GitHub token without submitting to the production repository. [1] [2]These changes provide a safe and isolated path for publishing canary builds, ensuring that only validated and intended releases reach production channels.