Skip to content

Commit 2a0d0ca

Browse files
committed
Add INSTALL_RUN_RUSH_LOCKFILE_PATH to pipeline runs.
1 parent 1a4e287 commit 2a0d0ca

8 files changed

Lines changed: 5155 additions & 34 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
OS: windows-latest
3535
name: Node.js v${{ matrix.NodeVersionDisplayName }} (${{ matrix.OS }})
3636
runs-on: ${{ matrix.OS }}
37+
env:
38+
INSTALL_RUN_RUSH_LOCKFILE_PATH: ${{ github.workspace }}/repo-a/common/config/validation/rush-package-lock.json
3739
steps:
3840
- name: Create ~/.rush-user/settings.json
3941
shell: pwsh

common/config/azure-pipelines/npm-post-publish.yaml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,23 @@ extends:
9696
- script: 'git config --local user.name Rushbot'
9797
displayName: 'git config name'
9898

99-
- script: 'node common/scripts/install-run-rush.js install --to repo-toolbox'
100-
displayName: 'Rush Install'
99+
- template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self
100+
parameters:
101+
Arguments: 'install --to repo-toolbox'
102+
DisplayName: 'Rush Install'
101103

102-
- script: 'node common/scripts/install-run-rush.js build --to repo-toolbox --verbose'
103-
displayName: 'Rush Build (repo-toolbox)'
104+
- template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self
105+
parameters:
106+
Arguments: 'build --to repo-toolbox --verbose'
107+
DisplayName: 'Rush Build (repo-toolbox)'
104108

105109
- script: 'node repo-scripts/repo-toolbox/lib-commonjs/start.js bump-decoupled-local-dependencies'
106110
displayName: 'Bump decoupled local dependencies'
107111

108-
- script: 'node common/scripts/install-run-rush.js update'
109-
displayName: 'Rush Update'
112+
- template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self
113+
parameters:
114+
Arguments: 'update'
115+
DisplayName: 'Rush Update'
110116

111117
- bash: |
112118
set -e
@@ -124,15 +130,15 @@ extends:
124130
git commit -m "$(CommitMessage)"
125131
displayName: 'Commit dependency changes'
126132
127-
- bash: |
128-
set -e
129-
130-
node common/scripts/install-run-rush.js change \
131-
--bulk \
132-
--bump-type none \
133+
- template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self
134+
parameters:
135+
Arguments: >
136+
change
137+
--bulk
138+
--bump-type none
133139
--commit-message "chore: generate change files for decoupled dependency bump"
134-
displayName: 'Generate change files'
135-
condition: and(succeeded(), eq(variables.HasChanges, 'true'))
140+
DisplayName: 'Generate change files'
141+
Condition: "and(succeeded(), eq(variables.HasChanges, 'true'))"
136142

137143
- template: /common/config/azure-pipelines/templates/push-and-create-github-pr.yaml@self
138144
parameters:
@@ -163,13 +169,15 @@ extends:
163169
parameters:
164170
NodeMajorVersion: 24
165171

166-
# Build the custom Docusaurus plugin for api-documenter in the
167-
# rushstack-websites repo.
168-
- script: 'node common/scripts/install-run-rush.js install'
169-
displayName: 'Rush Install (rushstack-websites)'
172+
- template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self
173+
parameters:
174+
Arguments: 'install'
175+
DisplayName: 'Rush Install (rushstack-websites)'
170176

171-
- script: 'node common/scripts/install-run-rush.js build --to-except api.rushstack.io --verbose'
172-
displayName: 'Rush Build to-except api.rushstack.io (rushstack-websites)'
177+
- template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self
178+
parameters:
179+
Arguments: 'build --to-except api.rushstack.io --verbose'
180+
DisplayName: 'Rush Build to-except api.rushstack.io (rushstack-websites)'
173181

174182
# Download the api artifact from the triggering publish pipeline.
175183
# AzDO automatically resolves which pipeline resource triggered this run.

common/config/azure-pipelines/templates/build.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,26 @@ steps:
1010
- script: 'git config --local user.name Rushbot'
1111
displayName: 'git config name'
1212

13-
- script: 'node common/scripts/install-run-rush.js change --verify'
14-
displayName: 'Verify Change Logs'
13+
- template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self
14+
parameters:
15+
Arguments: 'change --verify'
16+
DisplayName: 'Verify Change Logs'
1517

16-
- script: 'node common/scripts/install-run-rush.js install'
17-
displayName: 'Rush Install'
18+
- template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self
19+
parameters:
20+
Arguments: 'install'
21+
DisplayName: 'Rush Install'
1822

1923
# - bash: |
2024
# /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
2125
# echo ">>> Started xvfb"
2226
# displayName: Start xvfb
2327
# condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
2428

25-
- script: 'node common/scripts/install-run-rush.js retest --verbose --production ${{ parameters.BuildParameters }}'
26-
displayName: 'Rush retest (install-run-rush)'
29+
- template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self
30+
parameters:
31+
Arguments: 'retest --verbose --production ${{ parameters.BuildParameters }}'
32+
DisplayName: 'Rush retest (install-run-rush)'
2733

2834
- script: 'npm run test'
2935
workingDirectory: 'build-tests/rush-package-manager-integration-test'

common/config/azure-pipelines/templates/bump-versions.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,11 @@ parameters:
66
default: $(Build.SourceBranchName)
77

88
steps:
9-
- script: 'node common/scripts/install-run-rush.js version --bump --version-policy ${{ parameters.VersionPolicyName }} --target-branch ${{ parameters.BranchName }}'
10-
displayName: 'Rush Version (Policy: ${{ parameters.VersionPolicyName }})'
9+
- template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self
10+
parameters:
11+
Arguments: >
12+
version
13+
--bump
14+
--version-policy ${{ parameters.VersionPolicyName }}
15+
--target-branch ${{ parameters.BranchName }}
16+
DisplayName: 'Rush Version (Policy: ${{ parameters.VersionPolicyName }})'
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Runs install-run-rush.js with the specified CLI arguments and sets the
2+
# INSTALL_RUN_RUSH_LOCKFILE_PATH environment variable.
3+
parameters:
4+
- name: Arguments
5+
type: string
6+
- name: DisplayName
7+
type: string
8+
- name: Condition
9+
type: string
10+
default: ''
11+
- name: NpmAuthToken
12+
type: string
13+
default: ''
14+
15+
steps:
16+
- script: 'node common/scripts/install-run-rush.js ${{ parameters.Arguments }}'
17+
displayName: '${{ parameters.DisplayName }}'
18+
${{ if ne(parameters.Condition, '') }}:
19+
condition: ${{ parameters.Condition }}
20+
env:
21+
INSTALL_RUN_RUSH_LOCKFILE_PATH: $(Build.SourcesDirectory)/common/config/validation/rush-package-lock.json
22+
${{ if ne(parameters.NpmAuthToken, '') }}:
23+
NPM_AUTH_TOKEN: ${{ parameters.NpmAuthToken }}
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
steps:
2-
- script: 'node common/scripts/install-run-rush.js publish --publish --pack --include-all --release-folder $(Build.ArtifactStagingDirectory)/packages'
3-
displayName: 'Rush Pack'
2+
- template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self
3+
parameters:
4+
Arguments: >
5+
publish
6+
--publish
7+
--pack
8+
--include-all
9+
--release-folder $(Build.ArtifactStagingDirectory)/packages
10+
DisplayName: 'Rush Pack'

common/config/azure-pipelines/templates/publish.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ parameters:
66
default: $(Build.SourceBranchName)
77

88
steps:
9-
- script: 'node common/scripts/install-run-rush.js publish --apply --publish --include-all --target-branch ${{ parameters.BranchName }} --add-commit-details --set-access-level public'
10-
displayName: 'Rush Publish (Policy: ${{ parameters.VersionPolicyName }})'
11-
env:
12-
NPM_AUTH_TOKEN: $(npmToken)
9+
- template: /common/config/azure-pipelines/templates/install-run-rush.yaml@self
10+
parameters:
11+
Arguments: >
12+
publish
13+
--apply
14+
--publish
15+
--include-all
16+
--target-branch ${{ parameters.BranchName }}
17+
--add-commit-details --set-access-level public
18+
DisplayName: 'Rush Publish (Policy: ${{ parameters.VersionPolicyName }})'
19+
NpmAuthToken: $(npmToken)

0 commit comments

Comments
 (0)