Skip to content

Commit cc7772a

Browse files
authored
Use 1ES Templates in CI Pipelines (#5706)
1 parent 7e5f62c commit cc7772a

18 files changed

Lines changed: 337 additions & 556 deletions

eng/common/templates/steps/generate-sbom.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,4 @@ steps:
3333
PackageName: ${{ parameters.packageName }}
3434
BuildDropPath: ${{ parameters.buildDropPath }}
3535
PackageVersion: ${{ parameters.packageVersion }}
36-
ManifestDirPath: ${{ parameters.manifestDirPath }}
37-
38-
- task: PublishPipelineArtifact@1
39-
displayName: Publish SBOM manifest
40-
continueOnError: ${{parameters.sbomContinueOnError}}
41-
inputs:
42-
targetPath: '${{parameters.manifestDirPath}}'
43-
artifactName: $(ARTIFACT_NAME)
36+
ManifestDirPath: ${{ parameters.manifestDirPath }}

eng/pipelines/ci.yml

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,14 @@ parameters:
66
values:
77
- Production
88
- Staging
9-
- name: E2EPart1AgentCleanup
10-
displayName: Delete or keep E2E Part 1 machine for debugging
11-
type: string
12-
default: delete
13-
values:
14-
- delete
15-
- stop
16-
- name: E2EPart2AgentCleanup
17-
displayName: Delete or keep E2E Part 2 machine for debugging
18-
type: string
19-
default: delete
20-
values:
21-
- delete
22-
- stop
23-
- name: ApexAgentCleanup
24-
displayName: Delete or keep VS Apex test machine for debugging
25-
type: string
26-
default: delete
27-
values:
28-
- delete
29-
- stop
9+
3010
- name: NuGetLocalizationType
3111
displayName: Whether to do production-ready localization (Full), or pseudo-localization, aka PLOC, (Pseudo) for testing.
3212
type: string
3313
default: Full
3414
values:
3515
- Full
3616
- Pseudo
37-
- name: RunApexTests
38-
displayName: Run Apex tests
39-
type: boolean
40-
default: true
4117
- name: RunBuildForPublishing
4218
displayName: Build bits for publishing
4319
type: boolean
@@ -46,10 +22,6 @@ parameters:
4622
displayName: Run cross framweork tests on Windows
4723
type: boolean
4824
default: false
49-
- name: RunEndToEndTests
50-
displayName: Run end-to-end tests
51-
type: boolean
52-
default: false
5325
- name: RunFunctionalTestsOnWindows
5426
displayName: Run functional tests on Windows
5527
type: boolean
@@ -88,7 +60,6 @@ variables:
8860
NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY: 3,1000
8961
Codeql.Enabled: false
9062
Codeql.TSAEnabled: false
91-
RunApexTests: ${{ parameters.RunApexTests }}
9263
RunBuildForPublishing: ${{ parameters.RunBuildForPublishing }}
9364
RunCrossFrameworkTestsOnWindows: ${{ parameters.RunCrossFrameworkTestsOnWindows }}
9465
RunEndToEndTests: ${{ parameters.RunEndToEndTests }}
@@ -102,15 +73,10 @@ stages:
10273
- template: templates/pipeline.yml
10374
parameters:
10475
isOfficialBuild: false
105-
ApexAgentCleanup: ${{parameters.ApexAgentCleanup}}
10676
DartLabEnvironment: ${{parameters.DartLabEnvironment}}
107-
E2EPart1AgentCleanup: ${{parameters.E2EPart1AgentCleanup}}
108-
E2EPart2AgentCleanup: ${{parameters.E2EPart2AgentCleanup}}
10977
NuGetLocalizationType: ${{parameters.NuGetLocalizationType}}
110-
RunApexTests: ${{parameters.RunApexTests}}
11178
RunBuildForPublishing: ${{parameters.RunBuildForPublishing}}
11279
RunCrossFrameworkTestsOnWindows: ${{parameters.RunCrossFrameworkTestsOnWindows}}
113-
RunEndToEndTests: ${{parameters.RunEndToEndTests}}
11480
RunFunctionalTestsOnWindows: ${{parameters.RunFunctionalTestsOnWindows}}
11581
RunSourceBuild: ${{parameters.RunSourceBuild}}
11682
RunTestsOnLinux: ${{parameters.RunTestsOnLinux}}

eng/pipelines/official.yml

Lines changed: 30 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,4 @@
11
parameters:
2-
- name: DartLabEnvironment
3-
displayName: DartLab Environment
4-
type: string
5-
default: Production
6-
values:
7-
- Production
8-
- Staging
9-
- name: E2EPart1AgentCleanup
10-
displayName: Delete or keep E2E Part 1 machine for debugging
11-
type: string
12-
default: delete
13-
values:
14-
- delete
15-
- stop
16-
- name: E2EPart2AgentCleanup
17-
displayName: Delete or keep E2E Part 2 machine for debugging
18-
type: string
19-
default: delete
20-
values:
21-
- delete
22-
- stop
23-
- name: ApexAgentCleanup
24-
displayName: Delete or keep VS Apex test machine for debugging
25-
type: string
26-
default: delete
27-
values:
28-
- delete
29-
- stop
30-
- name: RunApexTests
31-
displayName: Run Apex tests
32-
type: boolean
33-
default: true
342
- name: RunBuildForPublishing
353
displayName: Build bits for publishing
364
type: boolean
@@ -39,10 +7,6 @@ parameters:
397
displayName: Run cross framweork tests on Windows
408
type: boolean
419
default: true
42-
- name: RunEndToEndTests
43-
displayName: Run end-to-end tests
44-
type: boolean
45-
default: true
4610
- name: RunFunctionalTestsOnWindows
4711
displayName: Run functional tests on Windows
4812
type: boolean
@@ -65,47 +29,51 @@ parameters:
6529
default: true
6630

6731
resources:
68-
pipelines:
69-
- pipeline: DartLab
70-
source: DartLab
71-
branch: main
7232
repositories:
73-
- repository: DartLabTemplates
33+
- repository: MicroBuildTemplate
7434
type: git
75-
name: DartLab.Templates
76-
ref: refs/heads/main
35+
name: 1ESPipelineTemplates/MicroBuildTemplate
36+
ref: refs/tags/release
7737

7838
variables:
7939
BINLOG_DIRECTORY: $(Build.StagingDirectory)/binlog
8040
DOTNET_NOLOGO: 1
8141
NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY: 3,1000
8242
Codeql.Enabled: false
8343
Codeql.TSAEnabled: false
84-
RunApexTests: ${{ parameters.RunApexTests }}
8544
RunBuildForPublishing: ${{ parameters.RunBuildForPublishing }}
8645
RunCrossFrameworkTestsOnWindows: ${{ parameters.RunCrossFrameworkTestsOnWindows }}
87-
RunEndToEndTests: ${{ parameters.RunEndToEndTests }}
8846
RunFunctionalTestsOnWindows: ${{ parameters.RunFunctionalTestsOnWindows }}
8947
RunSourceBuild: ${{ parameters.RunSourceBuild }}
9048
RunTestsOnLinux: ${{ parameters.RunTestsOnLinux }}
9149
RunTestsOnMac: ${{ parameters.RunTestsOnMac }}
9250
RunMonoTestsOnMac: ${{ parameters.RunMonoTestsOnMac }}
9351

94-
stages:
95-
- template: templates/pipeline.yml
52+
extends:
53+
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
9654
parameters:
97-
isOfficialBuild: true
98-
DartLabEnvironment: ${{parameters.DartLabEnvironment}}
99-
E2EPart1AgentCleanup: ${{parameters.E2EPart1AgentCleanup}}
100-
E2EPart2AgentCleanup: ${{parameters.E2EPart2AgentCleanup}}
101-
ApexAgentCleanup: ${{parameters.ApexAgentCleanup}}
102-
NuGetLocalizationType: Full
103-
RunApexTests: ${{parameters.RunApexTests}}
104-
RunBuildForPublishing: ${{parameters.RunBuildForPublishing}}
105-
RunCrossFrameworkTestsOnWindows: ${{parameters.RunCrossFrameworkTestsOnWindows}}
106-
RunEndToEndTests: ${{parameters.RunEndToEndTests}}
107-
RunFunctionalTestsOnWindows: ${{parameters.RunFunctionalTestsOnWindows}}
108-
RunSourceBuild: ${{parameters.RunSourceBuild}}
109-
RunTestsOnLinux: ${{parameters.RunTestsOnLinux}}
110-
RunTestsOnMac: ${{parameters.RunTestsOnMac}}
111-
RunMonoTestsOnMac: ${{parameters.RunMonoTestsOnMac}}
55+
sdl:
56+
sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES
57+
binskim:
58+
enabled: true
59+
scanOutputDirectoryOnly: true
60+
sbom:
61+
enabled: false
62+
pool:
63+
name: AzurePipelines-EO
64+
image: 1ESPT-Windows2022
65+
os: windows
66+
customBuildTags:
67+
- ES365AIMigrationTooling
68+
stages:
69+
- template: /eng/pipelines/templates/pipeline.yml@self
70+
parameters:
71+
isOfficialBuild: true
72+
NuGetLocalizationType: Full
73+
RunBuildForPublishing: ${{parameters.RunBuildForPublishing}}
74+
RunCrossFrameworkTestsOnWindows: ${{parameters.RunCrossFrameworkTestsOnWindows}}
75+
RunFunctionalTestsOnWindows: ${{parameters.RunFunctionalTestsOnWindows}}
76+
RunSourceBuild: ${{parameters.RunSourceBuild}}
77+
RunTestsOnLinux: ${{parameters.RunTestsOnLinux}}
78+
RunTestsOnMac: ${{parameters.RunTestsOnMac}}
79+
RunMonoTestsOnMac: ${{parameters.RunMonoTestsOnMac}}

eng/pipelines/pull_request.yml

Lines changed: 29 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,11 @@
11
parameters:
2-
- name: DartLabEnvironment
3-
displayName: DartLab Environment
4-
type: string
5-
default: Production
6-
values:
7-
- Production
8-
- Staging
9-
- name: E2EPart1AgentCleanup
10-
displayName: Delete or keep E2E Part 1 machine for debugging
11-
type: string
12-
default: delete
13-
values:
14-
- delete
15-
- stop
16-
- name: E2EPart2AgentCleanup
17-
displayName: Delete or keep E2E Part 2 machine for debugging
18-
type: string
19-
default: delete
20-
values:
21-
- delete
22-
- stop
23-
- name: ApexAgentCleanup
24-
displayName: Delete or keep VS Apex test machine for debugging
25-
type: string
26-
default: delete
27-
values:
28-
- delete
29-
- stop
302
- name: NuGetLocalizationType
313
displayName: Whether to do production-ready localization (Full), or pseudo-localization, aka PLOC, (Pseudo) for testing.
324
type: string
335
default: Full
346
values:
357
- Full
368
- Pseudo
37-
- name: RunApexTests
38-
displayName: Run Apex tests
39-
type: boolean
40-
default: true
419
- name: RunBuildForPublishing
4210
displayName: Build bits for publishing
4311
type: boolean
@@ -46,10 +14,6 @@ parameters:
4614
displayName: Run cross framweork tests on Windows
4715
type: boolean
4816
default: true
49-
- name: RunEndToEndTests
50-
displayName: Run end-to-end tests
51-
type: boolean
52-
default: true
5317
- name: RunFunctionalTestsOnWindows
5418
displayName: Run functional tests on Windows
5519
type: boolean
@@ -70,48 +34,49 @@ parameters:
7034
displayName: Run Mono tests on Mac
7135
type: boolean
7236
default: true
73-
7437
resources:
75-
pipelines:
76-
- pipeline: DartLab
77-
source: DartLab
78-
branch: main
7938
repositories:
80-
- repository: DartLabTemplates
39+
- repository: MicroBuildTemplate
8140
type: git
82-
name: DartLab.Templates
83-
ref: refs/heads/main
84-
41+
name: 1ESPipelineTemplates/MicroBuildTemplate
42+
ref: refs/tags/release
8543
variables:
8644
BINLOG_DIRECTORY: $(Build.StagingDirectory)/binlog
8745
DOTNET_NOLOGO: 1
8846
NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY: 3,1000
8947
Codeql.Enabled: false
9048
Codeql.TSAEnabled: false
91-
RunApexTests: ${{ parameters.RunApexTests }}
9249
RunBuildForPublishing: ${{ parameters.RunBuildForPublishing }}
9350
RunCrossFrameworkTestsOnWindows: ${{ parameters.RunCrossFrameworkTestsOnWindows }}
94-
RunEndToEndTests: ${{ parameters.RunEndToEndTests }}
9551
RunFunctionalTestsOnWindows: ${{ parameters.RunFunctionalTestsOnWindows }}
9652
RunSourceBuild: ${{ parameters.RunSourceBuild }}
9753
RunTestsOnLinux: ${{ parameters.RunTestsOnLinux }}
9854
RunTestsOnMac: ${{ parameters.RunTestsOnMac }}
9955
RunMonoTestsOnMac: ${{ parameters.RunMonoTestsOnMac }}
100-
101-
stages:
102-
- template: templates/pipeline.yml
56+
extends:
57+
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
10358
parameters:
104-
DartLabEnvironment: ${{parameters.DartLabEnvironment}}
105-
E2EPart1AgentCleanup: ${{parameters.E2EPart1AgentCleanup}}
106-
E2EPart2AgentCleanup: ${{parameters.E2EPart2AgentCleanup}}
107-
ApexAgentCleanup: ${{parameters.ApexAgentCleanup}}
108-
NuGetLocalizationType: ${{parameters.NuGetLocalizationType}}
109-
RunApexTests: ${{parameters.RunApexTests}}
110-
RunBuildForPublishing: ${{parameters.RunBuildForPublishing}}
111-
RunCrossFrameworkTestsOnWindows: ${{parameters.RunCrossFrameworkTestsOnWindows}}
112-
RunEndToEndTests: ${{parameters.RunEndToEndTests}}
113-
RunFunctionalTestsOnWindows: ${{parameters.RunFunctionalTestsOnWindows}}
114-
RunSourceBuild: ${{parameters.RunSourceBuild}}
115-
RunTestsOnLinux: ${{parameters.RunTestsOnLinux}}
116-
RunTestsOnMac: ${{parameters.RunTestsOnMac}}
117-
RunMonoTestsOnMac: ${{parameters.RunMonoTestsOnMac}}
59+
sdl:
60+
sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES
61+
binskim:
62+
enabled: true
63+
scanOutputDirectoryOnly: true
64+
sbom:
65+
enabled: false
66+
pool:
67+
name: AzurePipelines-EO
68+
image: 1ESPT-Windows2022
69+
os: windows
70+
customBuildTags:
71+
- ES365AIMigrationTooling
72+
stages:
73+
- template: /eng/pipelines/templates/pipeline.yml@self
74+
parameters:
75+
NuGetLocalizationType: ${{parameters.NuGetLocalizationType}}
76+
RunBuildForPublishing: ${{parameters.RunBuildForPublishing}}
77+
RunCrossFrameworkTestsOnWindows: ${{parameters.RunCrossFrameworkTestsOnWindows}}
78+
RunFunctionalTestsOnWindows: ${{parameters.RunFunctionalTestsOnWindows}}
79+
RunSourceBuild: ${{parameters.RunSourceBuild}}
80+
RunTestsOnLinux: ${{parameters.RunTestsOnLinux}}
81+
RunTestsOnMac: ${{parameters.RunTestsOnMac}}
82+
RunMonoTestsOnMac: ${{parameters.RunMonoTestsOnMac}}

eng/pipelines/templates/Apex_Tests_On_Windows.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ stages:
125125
inlineScript: |
126126
Get-ChildItem Env: | Sort-Object Name | Format-Table -Wrap -AutoSize
127127
128-
- task: DownloadBuildArtifacts@0
129-
displayName: "Download Build artifacts"
128+
- task: DownloadPipelineArtifact@0
129+
displayName: "Download Pipeline artifacts"
130130
inputs:
131131
artifactName: "VS15"
132132
downloadPath: "$(Build.Repository.LocalPath)/artifacts"
@@ -154,6 +154,3 @@ stages:
154154
. $(System.DefaultWorkingDirectory)\\artifacts\\EndToEnd\\scripts\\PostGitCommitStatus.ps1
155155
SetCommitStatusForTestResult -PersonalAccessToken $(NuGetLurkerPersonalAccessToken) -VstsPersonalAccessToken $(System.AccessToken) -CommitSha $(Build.SourceVersion) -TestName "$(GitHubStatusName)"
156156
condition: "not(eq(variables['ManualGitHubChecks'], 'false'))"
157-
158-
- task: ComponentGovernanceComponentDetection@0
159-
displayName: 'Component Detection'

eng/pipelines/templates/Apex_Tests_On_Windows_Daily.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ stages:
209209
inlineScript: |
210210
Get-ChildItem Env: | Sort-Object Name | Format-Table -Wrap -AutoSize
211211
212-
- task: DownloadBuildArtifacts@0
213-
displayName: "Download Build artifacts"
212+
- task: DownloadPipelineArtifact@2
213+
displayName: "Download Pipeline artifacts"
214214
inputs:
215215
buildType: specific
216216
project: $(resources.pipeline.ComponentBuildUnderTest.projectID)
@@ -232,6 +232,3 @@ stages:
232232
displayName: "SetupFunctionalTests.ps1"
233233
inputs:
234234
scriptName: "$(System.DefaultWorkingDirectory)/artifacts/EndToEnd/scripts/SetupFunctionalTests.ps1"
235-
postDeployAndRunTestsStepList:
236-
- task: ComponentGovernanceComponentDetection@0
237-
displayName: 'Component Detection'

0 commit comments

Comments
 (0)