Skip to content

Commit c22abea

Browse files
iclantonCopilot
andcommitted
feat: add RepoPath parameter to install-run-rush pipeline template
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>
1 parent 3bb7435 commit c22abea

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

common/config/azure-pipelines/templates/install-run-rush.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ parameters:
1111
- name: NpmAuthToken
1212
type: string
1313
default: ''
14+
- name: RepoPath
15+
type: string
16+
default: '$(Build.SourcesDirectory)'
1417

1518
steps:
1619
- script: 'node common/scripts/install-run-rush.js ${{ parameters.Arguments }}'
1720
displayName: '${{ parameters.DisplayName }}'
21+
workingDirectory: ${{ parameters.RepoPath }}
1822
${{ if ne(parameters.Condition, '') }}:
1923
condition: ${{ parameters.Condition }}
2024
env:
21-
INSTALL_RUN_RUSH_LOCKFILE_PATH: $(Build.SourcesDirectory)/common/config/validation/rush-package-lock.json
25+
INSTALL_RUN_RUSH_LOCKFILE_PATH: ${{ parameters.RepoPath }}/common/config/validation/rush-package-lock.json
2226
${{ if ne(parameters.NpmAuthToken, '') }}:
2327
NPM_AUTH_TOKEN: ${{ parameters.NpmAuthToken }}

0 commit comments

Comments
 (0)