Add INSTALL_RUN_RUSH_LOCKFILE_PATH to pipeline runs.#5710
Merged
iclanton merged 8 commits intomicrosoft:mainfrom Mar 25, 2026
Merged
Add INSTALL_RUN_RUSH_LOCKFILE_PATH to pipeline runs.#5710iclanton merged 8 commits intomicrosoft:mainfrom
iclanton merged 8 commits intomicrosoft:mainfrom
Conversation
2a0d0ca to
3bb7435
Compare
4 tasks
iclanton
added a commit
to SharePoint/spfx
that referenced
this pull request
Mar 23, 2026
## Description Sets `INSTALL_RUN_RUSH_LOCKFILE_PATH` on every `install-run-rush.js` invocation in CI, pinning the Rush version used to the one recorded in `common/config/validation/rush-package-lock.json`. This mirrors the change made in microsoft/rushstack#5710. Changes: - Add `common/config/azure-pipelines/templates/install-run-rush.yaml` — a new wrapper template that sets the env var and accepts `Arguments`, `DisplayName`, `Condition`, and `RepoPath` parameters - Update `templates/pack.yaml`, `templates/bump-versions.yaml`, `bump-versions.yaml`, and `publish.yaml` to use the new template instead of inline `script:` steps - Add `INSTALL_RUN_RUSH_LOCKFILE_PATH` env var to the GitHub Actions CI job ## How was this tested Verified the pipeline YAML files are syntactically consistent with existing usage patterns. ## Type of change - [ ] Bug fix - [ ] New feature - [ ] Template change (keep templates and examples in sync) - [x] Docs/CI change (no source change) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a configurable RepoPath parameter (defaulting to Build.SourcesDirectory) so callers can specify a custom repo root when the checkout is in a non-default location. The parameter sets workingDirectory and adjusts INSTALL_RUN_RUSH_LOCKFILE_PATH accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
c22abea to
49871e7
Compare
bmiddha
approved these changes
Mar 25, 2026
| stdio: ['ignore', 'pipe', 'pipe'] | ||
| }); | ||
| const stdoutBuffer: string[] = []; | ||
| childProcess.stdout!.on('data', (chunk) => stdoutBuffer.push(chunk)); |
Contributor
There was a problem hiding this comment.
If you're expecting chunk to be a string, that implies that you have set encoding on the stream
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.
Summary
Improves the reliability of pipeline runs by pinning the Rush version used by
install-run-rush.jsto a validated lockfile, preventing unexpected Rush upgrades from breaking CI.INSTALL_RUN_RUSH_LOCKFILE_PATHsupport to theinstall-run-rush.yamlpipeline template, pointing to a checked-in lockfile atcommon/config/validation/rush-package-lock.json.RepoPathparameter to the template (defaults to$(Build.SourcesDirectory)) so callers with non-default checkout paths can specify the repo root; it drives bothworkingDirectoryand the lockfile path.BumpDecoupledLocalDependenciesto regeneraterush-package-lock.jsonas part of the automated decoupled dependency bump PR.Details
install-run-rush.jsrespects theINSTALL_RUN_RUSH_LOCKFILE_PATHenvironment variable to pin the npm install of the Rush version to a specific lockfile. Previously this was not set, so Rush could be silently upgraded (or downgraded) between runs. The new template sets it unconditionally.The
RepoPathparameter was needed because the post-publish pipeline checks out a second repo (rushstackWebsites) into a non-default directory; without it, theworkingDirectoryand lockfile path would point at the wrong location.BumpDecoupledLocalDependenciesnow copies the Rush package lockfile intocommon/config/validation/rush-package-lock.jsonafter runningrush update, keeping the pinned version in sync with the rest of the repo's dependency updates.How it was tested
Reviewed pipeline template changes manually and confirmed that all callers pass through the new
RepoPathparameter where needed. Therush-package-lock.jsoncontent was generated by runningrush updatelocally.