Repository navigation
Install Az.Storage for release storage publishing jobs - #28323
Merged
Justin Chung (jshigetomi) merged 2 commits intoNov 4, 2026
Merged
Justin Chung (jshigetomi) merged 2 commits into
Justin Chung (jshigetomi) merged 2 commits into
Conversation
added 2 commits
November 3, 2026 21:20
## Summary - Pin both PSInfra blob publication tasks to `AzurePowerShell@5.280.3`. - Pin the BuildInfo publication task to the same known-good task revision. ## Reason Release build [733701](https://dev.azure.com/mscodehub/PowerShellCore/_build/results?buildId=733701) resolved `AzurePowerShell@5` to a newer task revision and all three jobs failed because `New-AzStorageContext` was unavailable. Successful release build [732392](https://dev.azure.com/mscodehub/PowerShellCore/_build/results?buildId=732392) used task revision `5.280.3`. ## Validation - Verified exactly three task references were changed. - `git diff --check` passed. After merge, retry the `Make Blob Public` and `Upload BuildInfo.json` release stages; binaries and packages do not need rebuilding. ---- #### AI description (iteration 1) #### PR Classification CI/build pipeline configuration change to pin a task version for release stability. #### PR Summary Pinned the `AzurePowerShell` task version from `@5` to `@5.280.3` across pipeline templates to ensure consistent and reproducible behavior for the v7.7.0-rc.1 publishing process. - `release-MakeBlobPublic.yml`: Pinned two instances of the `AzurePowerShell` task to version `5.280.3`. - `release-upload-buildinfo.yml`: Pinned the `AzurePowerShell` task to version `5.280.3`. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
## Summary - Install `Az.Storage 9.7.2` from the internal `PowerShellGalleryMirror` Azure Artifacts feed in each storage-publication job. - Explicitly import `Az.Storage 9.7.2` before invoking storage commands. - Restore the tasks to `AzurePowerShell@5`; pinning task version `5.280.3` did not address the image dependency change. ## Reason Release run [734624](https://dev.azure.com/mscodehub/PowerShellCore/_build/results?buildId=734624) confirmed the exact task pin was honored, but `New-AzStorageContext` remained unavailable on `PSMMS2019-Secure 29.0.0`. Successful run [732392](https://dev.azure.com/mscodehub/PowerShellCore/_build/results?buildId=732392) used image version `27.0.0`, which contained the storage module. This change removes the release jobs' dependency on the floating image's module inventory. ## Validation - Verified exactly three storage-publication jobs were updated. - `git diff --check` passed. After merge, rerun only `Make Blob Public` and `Upload BuildInfo.json`; binaries and packages do not need rebuilding. ---- #### AI description (iteration 1) #### PR Classification CI/CD pipeline fix to ensure the correct `Az.Storage` module version is installed for release publishing tasks. #### PR Summary This PR updates release pipeline templates to explicitly install and import `Az.Storage` version 9.7.2 before executing Azure PowerShell tasks, replacing the pinned `AzurePowerShell@5.280.3` task version with `AzurePowerShell@5`. - `release-MakeBlobPublic.yml`: Adds steps to register the PowerShell Gallery mirror repository and install `Az.Storage` 9.7.2 before blob copy tasks; imports the module explicitly in inline scripts. - `release-upload-buildinfo.yml`: Adds similar module installation step before uploading build JSON to blob storage, and imports `Az.Storage` 9.7.2 in the inline script. - Both files downgrade the `AzurePowerShell` task version from `5.280.3` to `5` to use the latest compatible version. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Release publishing requires validation on PSMMS2019-Secure of mirror access and Az.Storage 9.7.2 compatibility with AzurePowerShell@5’s selected Az.Accounts version, neither of which YAML parsing establishes.
No open issues 🎉
What changed in this PR
This PR removes release storage publishing jobs’ reliance on a preinstalled Az.Storage module by explicitly installing and importing version 9.7.2.
Changes:
- Registers
PowerShellGalleryMirrorwhen needed and installs the pinned module in all three storage-publication jobs. - Imports the exact version before storage commands run in
AzurePowerShell@5.
| File | Description |
|---|---|
.pipelines/templates/release-upload-buildinfo.yml |
Installs and imports Az.Storage for build-info uploads. |
.pipelines/templates/release-MakeBlobPublic.yml |
Installs and imports Az.Storage for both blob-copy jobs. |
Review effort: Balanced
Aditya Patwardhan (adityapatwardhan)
approved these changes
Nov 4, 2026
Justin Chung (jshigetomi)
merged commit Nov 4, 2026
609b8e6
into
PowerShell:master
40 of 41 checks passed
7 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
AzurePowerShelltask pin as its own commit to preserve the original release-fix history.AzurePowerShell@5and explicitly installs and importsAz.Storage 9.7.2for all three storage-publication jobs.PR Context
The release publishing jobs depended on
Az.Storagebeing present in the hosted image. Pinning the Azure PowerShell task revision did not restoreNew-AzStorageContext, so the follow-up removes that image dependency by installing the required module fromPowerShellGalleryMirrorand importing the exact version before storage commands run.The two directly related source commits are preserved separately and in order. Both applied cleanly to current
masterwithout conflict-resolution changes.Validation:
python -c "import yaml, pathlib; files=[pathlib.Path(r'.pipelines\templates\release-MakeBlobPublic.yml'), pathlib.Path(r'.pipelines\templates\release-upload-buildinfo.yml')]; [yaml.safe_load(p.read_text(encoding='utf-8')) for p in files]; print('Parsed YAML:', ', '.join(str(p) for p in files))"— Passed; both changed templates parsed successfully.git diff --check origin/master...HEAD— Passed.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header