Skip to content

Commit b64dfdc

Browse files
authored
Merge pull request #4406 from microsoft/1es-templates
Use the managed pipeline template during publishing.
2 parents 253938c + f610d7d commit b64dfdc

File tree

8 files changed

+141
-80
lines changed

8 files changed

+141
-80
lines changed

build-tests/rush-amazon-s3-build-cache-plugin-integration-test/docker-compose.yml

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ services:
77
ports:
88
- '9000:9000'
99
- '9001:9001'
10-
environment:
11-
MINIO_ROOT_USER: minio
12-
MINIO_ROOT_PASSWORD: minio123
1310
healthcheck:
1411
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
1512
interval: 30s

build-tests/rush-redis-cobuild-plugin-integration-test/src/testLockProvider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { OperationStatus, type ICobuildContext, RushSession } from '@microsoft/r
1010

1111
const options: IRedisCobuildLockProviderOptions = {
1212
url: 'redis://localhost:6379',
13-
password: 'redis123'
13+
password: 'redis123' // [SuppressMessage("Microsoft.Security", "CS001:SecretInline", Justification="Password used in unit test.")]
1414
};
1515

1616
const rushSession: RushSession = new RushSession({
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"comment": "",
5+
"type": "none",
6+
"packageName": "@microsoft/rush"
7+
}
8+
],
9+
"packageName": "@microsoft/rush",
10+
"email": "[email protected]"
11+
}
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,60 @@
1-
pool:
2-
vmImage: 'ubuntu-latest'
3-
41
variables:
52
- name: FORCE_COLOR
63
value: 1
74
- name: SourceBranch
85
value: $[ replace(replace(resources.repositories.self.ref, 'refs/heads/', ''), 'refs/pull/', 'refs/remotes/pull/') ]
96

10-
steps:
11-
- checkout: self
12-
persistCredentials: true
13-
14-
- template: templates/install-node.yaml
15-
16-
- template: templates/build.yaml
17-
18-
- template: templates/bump-versions.yaml
19-
parameters:
20-
VersionPolicyName: noRush
21-
BranchName: $(SourceBranch)
22-
23-
- template: templates/bump-versions.yaml
24-
parameters:
25-
VersionPolicyName: rush
26-
BranchName: $(SourceBranch)
27-
28-
- script: 'node libraries/rush-lib/scripts/plugins-prepublish.js'
29-
displayName: 'Prepublish workaround for rush-lib'
30-
31-
- template: templates/publish.yaml
32-
parameters:
33-
VersionPolicyName: noRush
34-
BranchName: $(SourceBranch)
35-
36-
- template: templates/publish.yaml
37-
parameters:
38-
VersionPolicyName: rush
39-
BranchName: $(SourceBranch)
40-
41-
- template: templates/record-published-versions.yaml
7+
resources:
8+
repositories:
9+
- repository: 1esPipelines
10+
type: git
11+
name: 1ESPipelineTemplates/1ESPipelineTemplates
12+
ref: refs/tags/release
13+
14+
extends:
15+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
16+
parameters:
17+
pool:
18+
name: Azure-Pipelines-1ESPT-ExDShared
19+
os: windows
20+
stages:
21+
- stage:
22+
jobs:
23+
- job:
24+
templateContext:
25+
outputs:
26+
- output: pipelineArtifact
27+
targetPath: $(Build.ArtifactStagingDirectory)/published-versions
28+
artifactName: published-versions
29+
steps:
30+
- checkout: self
31+
persistCredentials: true
32+
33+
- template: /common/config/azure-pipelines/templates/install-node.yaml@self
34+
35+
- template: /common/config/azure-pipelines/templates/build.yaml@self
36+
37+
- template: /common/config/azure-pipelines/templates/bump-versions.yaml@self
38+
parameters:
39+
VersionPolicyName: noRush
40+
BranchName: $(SourceBranch)
41+
42+
- template: /common/config/azure-pipelines/templates/bump-versions.yaml@self
43+
parameters:
44+
VersionPolicyName: rush
45+
BranchName: $(SourceBranch)
46+
47+
- script: 'node libraries/rush-lib/scripts/plugins-prepublish.js'
48+
displayName: 'Prepublish workaround for rush-lib'
49+
50+
- template: /common/config/azure-pipelines/templates/publish.yaml@self
51+
parameters:
52+
VersionPolicyName: noRush
53+
BranchName: $(SourceBranch)
54+
55+
- template: /common/config/azure-pipelines/templates/publish.yaml@self
56+
parameters:
57+
VersionPolicyName: rush
58+
BranchName: $(SourceBranch)
59+
60+
- template: /common/config/azure-pipelines/templates/record-published-versions.yaml@self
+36-17
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,47 @@
1-
pool:
2-
vmImage: 'ubuntu-latest'
3-
41
variables:
52
- name: FORCE_COLOR
63
value: 1
74
- name: SourceBranch
85
value: $[ replace(replace(resources.repositories.self.ref, 'refs/heads/', ''), 'refs/pull/', 'refs/remotes/pull/') ]
96

10-
steps:
11-
- checkout: self
12-
persistCredentials: true
7+
resources:
8+
repositories:
9+
- repository: 1esPipelines
10+
type: git
11+
name: 1ESPipelineTemplates/1ESPipelineTemplates
12+
ref: refs/tags/release
13+
14+
extends:
15+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
16+
parameters:
17+
pool:
18+
name: Azure-Pipelines-1ESPT-ExDShared
19+
os: windows
20+
stages:
21+
- stage:
22+
jobs:
23+
- job:
24+
templateContext:
25+
outputs:
26+
- output: pipelineArtifact
27+
targetPath: $(Build.ArtifactStagingDirectory)/published-versions
28+
artifactName: published-versions
29+
steps:
30+
- checkout: self
31+
persistCredentials: true
1332

14-
- template: templates/install-node.yaml
33+
- template: /common/config/azure-pipelines/templates/install-node.yaml@self
1534

16-
- template: templates/build.yaml
35+
- template: /common/config/azure-pipelines/templates/build.yaml@self
1736

18-
- template: templates/bump-versions.yaml
19-
parameters:
20-
VersionPolicyName: noRush
21-
BranchName: $(SourceBranch)
37+
- template: /common/config/azure-pipelines/templates/bump-versions.yaml@self
38+
parameters:
39+
VersionPolicyName: noRush
40+
BranchName: $(SourceBranch)
2241

23-
- template: templates/publish.yaml
24-
parameters:
25-
VersionPolicyName: noRush
26-
BranchName: $(SourceBranch)
42+
- template: /common/config/azure-pipelines/templates/publish.yaml@self
43+
parameters:
44+
VersionPolicyName: noRush
45+
BranchName: $(SourceBranch)
2746

28-
- template: templates/record-published-versions.yaml
47+
- template: /common/config/azure-pipelines/templates/record-published-versions.yaml@self
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
steps:
22
- script: 'node repo-scripts/repo-toolbox/lib/start.js record-versions --out-file $(Build.ArtifactStagingDirectory)/published-versions/published-versions.json'
33
displayName: 'Record Published Versions'
4-
- publish: $(Build.ArtifactStagingDirectory)/published-versions
5-
artifact: published-versions
6-
displayName: 'Publish Artifact: published-versions'
4+
# Published by the 1ES template
5+
# - publish: $(Build.ArtifactStagingDirectory)/published-versions
6+
# artifact: published-versions
7+
# displayName: 'Publish Artifact: published-versions'
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,42 @@
1-
pool:
2-
vmImage: 'ubuntu-latest'
3-
41
variables:
52
- name: FORCE_COLOR
63
value: 1
74

8-
steps:
9-
- checkout: self
10-
persistCredentials: true
5+
resources:
6+
repositories:
7+
- repository: 1esPipelines
8+
type: git
9+
name: 1ESPipelineTemplates/1ESPipelineTemplates
10+
ref: refs/tags/release
11+
12+
extends:
13+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
14+
parameters:
15+
pool:
16+
name: Azure-Pipelines-1ESPT-ExDShared
17+
os: windows
18+
stages:
19+
- stage:
20+
jobs:
21+
- job:
22+
steps:
23+
- checkout: self
24+
persistCredentials: true
1125

12-
- template: templates/install-node.yaml
26+
- template: /common/config/azure-pipelines/templates/install-node.yaml@self
1327

14-
- template: templates/build.yaml
15-
parameters:
16-
BuildParameters: >
17-
--to rushstack
18-
PerformValidation: false
28+
- template: /common/config/azure-pipelines/templates/build.yaml@self
29+
parameters:
30+
BuildParameters: >
31+
--to rushstack
32+
PerformValidation: false
1933

20-
- script: node $(Build.SourcesDirectory)/common/scripts/install-run-rushx.js package
21-
workingDirectory: $(Build.SourcesDirectory)/vscode-extensions/rush-vscode-extension
22-
displayName: 'Package vscode extension'
34+
- script: node $(Build.SourcesDirectory)/common/scripts/install-run-rushx.js package
35+
workingDirectory: $(Build.SourcesDirectory)/vscode-extensions/rush-vscode-extension
36+
displayName: 'Package vscode extension'
2337

24-
- script: node $(Build.SourcesDirectory)/common/scripts/install-run-rushx.js deploy
25-
workingDirectory: $(Build.SourcesDirectory)/vscode-extensions/rush-vscode-extension
26-
displayName: 'Publish vscode extension'
27-
env:
28-
VSCE_PAT: $(vscePat)
38+
- script: node $(Build.SourcesDirectory)/common/scripts/install-run-rushx.js deploy
39+
workingDirectory: $(Build.SourcesDirectory)/vscode-extensions/rush-vscode-extension
40+
displayName: 'Publish vscode extension'
41+
env:
42+
VSCE_PAT: $(vscePat)

rush-plugins/rush-redis-cobuild-plugin/src/test/RedisCobuildLockProvider.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ describe(RedisCobuildLockProvider.name, () => {
8585

8686
it('expands options with environment variables', () => {
8787
const expectedOptions = {
88-
password: 'redis123'
88+
password: 'redis123' // [SuppressMessage("Microsoft.Security", "CS001:SecretInline", Justification="Password used in unit test.")]
8989
};
9090
const actualOptions = RedisCobuildLockProvider.expandOptionsWithEnvironmentVariables(
9191
{

0 commit comments

Comments
 (0)