Download PMC Packages through TemplateContext#27326
Download PMC Packages through TemplateContext#27326jshigetomi merged 12 commits intoPowerShell:masterfrom
TemplateContext#27326Conversation
There was a problem hiding this comment.
| tsaOptionsFile: PowerShell/.config/tsaoptions.json | |
| tsaOptionsFile: $(Build.SourcesDirectory)/PowerShell/.config/tsaoptions.json |
There was a problem hiding this comment.
I think we have remove PowerShell here as well... Running one more time to confirm
There was a problem hiding this comment.
The fix here was to add tsa to the release-prep template
There was a problem hiding this comment.
Pull request overview
This PR updates the Azure DevOps EV2/PMC release pipelines to use OneBranch templateContext.inputs for artifact downloads (avoiding disallowed download tasks) and to make the publish stage configurable for non-official/dry-run scenarios.
Changes:
- Refactors EV2 prep + publish templates to download artifacts via
templateContext.inputsinstead of explicit download tasks. - Adds publish-stage parameters to support non-production environments and an option to skip the Ev2 push during dry-runs.
- Updates official/non-official Azure release pipelines to run the publish stage in non-official mode and to use an explicit TSA options path.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.pipelines/templates/release-publish-pmc.yml |
Parameterizes PMC publish stage and switches artifact retrieval to templateContext.inputs; adds optional Ev2 push skip. |
.pipelines/templates/release-prep-for-ev2.yml |
Moves PSPackagesOfficial artifact downloads into templateContext.inputs and adjusts package discovery accordingly; adds TSA config variable. |
.pipelines/PowerShell-Release-Official-Azure.yml |
Updates tsaOptionsFile to an explicit path for TSA configuration. |
.pipelines/NonOfficial/PowerShell-Release-Azure-NonOfficial.yml |
Updates tsaOptionsFile path and runs PMC publish stage in “Test” mode with Ev2 push skipped. |
There was a problem hiding this comment.
stagePrefix and releaseEnvironment can be set inconsistently (e.g., releaseEnvironment: PPE but leaving stagePrefix at default Prod), which would produce a stage name that doesn't match the actual release environment and can fail OneBranch environment/stage-name validation. Consider deriving the stage prefix from releaseEnvironment inside the template (e.g., map Production -> Prod, else use the environment name) so callers only need to set releaseEnvironment (and optionally override if there’s a true exception).

PR Summary
This pull request improves the Azure pipeline release process by enhancing flexibility and maintainability, especially for non-official (dry-run/test) releases. The main changes introduce parameterization for release environments, refactor artifact download steps to use
templateContext.inputs, and add logic to optionally skip the Ev2 push step during test runs.Key improvements include:
Pipeline parameterization and flexibility:
releaseEnvironment,approvalServiceEnvironment,stagePrefix,skipEv2Push) torelease-publish-pmc.yml, allowing the pipeline to target different environments (Production, PPE, Test) and to skip the Ev2 push step for dry-run scenarios.PowerShell-Release-Azure-NonOfficial.yml) to run the publish stage with test parameters and skip the actual Ev2 push, enabling artifact download validation without affecting production.Artifact download and handling improvements:
release-prep-for-ev2.ymlto usetemplateContext.inputsfor specifying artifacts, replacing multiple explicit download steps with a more maintainable and declarative approach. [1] [2]release-publish-pmc.ymlto usetemplateContext.inputsfor artifact retrieval, ensuring consistency and simplifying artifact management.Stage and job naming standardization:
stagePrefixparameter, improving clarity and compatibility with OneBranch requirements.These changes collectively make the pipeline more robust, easier to test in non-production environments, and simpler to maintain.
PR Context
This PR was made to unblock 7.4.15 and 7.6.1 PMC releases after EV2 pipeline decided to disallow the DownloadArtifacts task.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header