[release/v7.7.0-preview.1] Download PMC Packages through TemplateContext#27332
Conversation
Co-authored-by: Justin Chung <[email protected]>
055ea00
into
PowerShell:release/v7.7.0-preview.1
There was a problem hiding this comment.
Pull request overview
This PR backports the PMC (packages.microsoft.com) release publishing pipeline changes to release/v7.7.0-preview.1, migrating artifact downloads to OneBranch templateContext.inputs and adding parameters to support non-official/dry-run validation without performing an Ev2 push.
Changes:
- Refactor PMC publish stage to use
templateContext.inputsand parameterize environment/stage naming + optional Ev2 push. - Refactor EV2 prep stage to download PSPackages artifacts via
templateContext.inputsand adjust the copy logic accordingly. - Update release pipeline definitions to use an explicit TSA options file path and add a NonOfficial “download validation” publish-stage invocation.
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 the publish stage and switches artifact retrieval to templateContext.inputs. |
| .pipelines/templates/release-prep-for-ev2.yml | Switches package artifact download to templateContext.inputs and updates package discovery/copy logic. |
| .pipelines/PowerShell-Release-Official-Azure.yml | Updates TSA options file path and continues to invoke EV2 prep + publish templates. |
| .pipelines/NonOfficial/PowerShell-Release-Azure-NonOfficial.yml | Updates TSA options file path and adds a dry-run publish stage invocation with skipEv2Push. |
| steps: | ||
| - ${{ if not(parameters.skipEv2Push) }}: | ||
| - task: vsrm-ev2.vss-services-ev2.adm-release-task.ExpressV2Internal@1 | ||
| displayName: 'Ev2: Push to PMC' | ||
| inputs: | ||
| UseServerMonitorTask: true | ||
| EndpointProviderType: ApprovalService | ||
| ApprovalServiceEnvironment: ${{ parameters.approvalServiceEnvironment }} | ||
| ServiceRootPath: '$(Pipeline.Workspace)/EV2Specs/ServiceGroupRoot' | ||
| RolloutSpecPath: '$(Pipeline.Workspace)/EV2Specs/ServiceGroupRoot/RolloutSpec.json' |
There was a problem hiding this comment.
When skipEv2Push is true, this job compiles to having no steps (the only step is conditionally omitted). Azure Pipelines jobs typically require at least one step, and even if it runs, it won’t actually validate the templateContext.inputs download. Add an always-on step (e.g., list $(Pipeline.Workspace) contents / sanity-check required files) and make only the Ev2 task conditional.
Backport of #27326 to release/v7.7.0-preview.1
Triggered by @jshigetomi on behalf of @jshigetomi
Original CL Label: CL-BuildPackaging
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Required tooling change. Modifies the Azure DevOps release pipeline templates that publish PowerShell packages to PMC (packages.microsoft.com) via Ev2. Without this change, the v7.7.0-preview.1 release pipeline cannot publish packages because the Ev2 environment has disallowed the previously-used DownloadPipelineArtifact task in the publish stage. The PR migrates artifact download to
templateContext.inputs, parameterizes the publish stage (releaseEnvironment / approvalServiceEnvironment / stagePrefix / skipEv2Push), and adds a NonOfficial dry-run path that validates the new artifact download approach without performing the actual Ev2 push.Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Verified by:
release/v7.7.0-preview.1(one trivial conflict resolved — see Merge Conflicts section).templateContext.inputsartifact entries, both SDL variables (ob_sdl_credscan_suppressionsFile,ob_sdl_tsa_configFile), removal of legacy- download: PSPackagesOfficialsteps, and correct pwsh copy logic using$(Pipeline.Workspace)directly.templateContext.inputsartifact download withskipEv2Push: true).Functional verification of PMC publishing will happen during the actual v7.7.0-preview.1 release using the publish stage with production parameters.
Risk
REQUIRED: Check exactly one box.
High risk because this modifies the release publishing pipeline (Ev2 push to PMC) on the live release branch. However, this aligns the v7.7.0-preview.1 release branch with the same Ev2 publishing infrastructure now used in master, v7.4.15, and v7.6.1 backports. The Ev2 environment has disallowed the previous DownloadArtifacts task, so any publish from this branch will fail without this fix. Note: original PR has no
Backport-7.7.x-*label at all — proceeding at user request given the unblock-release justification stated in the PR body.Merge Conflicts
Single conflict in
.pipelines/templates/release-prep-for-ev2.ymlat theob_sdl_credscan_suppressionsFilevariable (same conflict as the v7.4.15 backport). The PR changed this path from backslashes to forward slashes AND added a newob_sdl_tsa_configFilevariable. Resolution: kept the release branch's existing backslash path forob_sdl_credscan_suppressionsFile(no functional change to that var on this branch) and added the newob_sdl_tsa_configFilevariable as introduced by the PR. All other hunks (templateContext.inputs block, removed- download: PSPackagesOfficialsteps, updated pwsh copy logic) applied cleanly.