Skip to content

Commit 2b80cee

Browse files
1ES Pipelines Template Adoption (#4670)
* 1ES Pipelines Template Adoption - Added 1Es templates ci - Changed pools for Windows/Ubuntu to 1ES pools - Disabled sign validation * 1ES Pipelines Template Adoption - Added baseline - Added pool to proxy tests * 1ES Pipelines Template Adoption - Restored sign validation * 1ES Pipelines Template Adoption - replaced pipelineArtifacts with buildArtifacts - changed artifact conditions * 1ES Pipelines Template Adoption - Skip CG - Add mariner pool * 1ES Pipelines Template Adoption - Skip CG - Add mariner pool * 1ES Pipelines Template Adoption - Skip CG - Add mariner pool * 1ES Pipelines Template Adoption - Add parameter for notifications * 1ES Pipelines Template Adoption - Add parameter for notifications * 1ES Pipelines Template Adoption - Add parameter for notifications * 1ES Pipelines Template Adoption - Add arm pool * 1ES Pipelines Template Adoption - changed to dnf * 1ES Pipelines Template Adoption - changed to dnf * 1ES Pipelines Template Adoption - changed to dnf * 1ES Pipelines Template Adoption - changed to dnf * 1ES Pipelines Template Adoption - replaced mariner pool with 1ES-ABTT-Shared-Pool * 1ES Pipelines Template Adoption - Restore release conditions * 1ES Pipelines Template Adoption - Temporary set agent's version * 1ES Pipelines Template Adoption - Skip directories when copying hashes * 1ES Pipelines Template Adoption - Skip directories when copying hashes * 1ES Pipelines Template Adoption - Change os to unix * 1ES Pipelines Template Adoption - Restore agent version
1 parent 1e9f5f1 commit 2b80cee

File tree

9 files changed

+654
-439
lines changed

9 files changed

+654
-439
lines changed

.azure-pipelines/build-job.yml

Lines changed: 26 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool.
12
parameters:
23

34
- name: jobName
@@ -43,9 +44,6 @@ parameters:
4344
- name: codeCoverage
4445
type: boolean
4546

46-
- name: componentDetection
47-
type: boolean
48-
4947
- name: sign
5048
type: boolean
5149

@@ -87,15 +85,26 @@ jobs:
8785
DisableDockerDetector: true
8886
nugetMultiFeedWarnLevel: none
8987
CheckoutBranch: ${{ parameters.branch }}
90-
88+
templateContext:
89+
outputs:
90+
- ${{ if or(parameters.unitTests, parameters.functionalTests) }}:
91+
- output: buildArtifacts
92+
displayName: 'Publish Test logs'
93+
condition: always()
94+
PathtoPublish: src/Test/TestLogs
95+
ArtifactName: ${{ parameters.os }}-${{ parameters.arch }}-$(System.JobId)
96+
- ${{ if eq(parameters.publishArtifact, true) }}:
97+
- output: buildArtifacts
98+
displayName: 'Publish Hash Artifact'
99+
PathtoPublish: _package
100+
ArtifactName: agent
101+
- ${{ if eq(parameters.publishArtifact, true) }}:
102+
- output: buildArtifacts
103+
displayName: 'Publish Agent Artifact'
104+
PathtoPublish: _package_hash
105+
ArtifactName: hash
91106
steps:
92107

93-
# Component detection
94-
- ${{ if parameters.componentDetection }}:
95-
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
96-
displayName: 'Component Detection'
97-
98-
# Clean
99108
- checkout: self
100109
clean: true
101110

@@ -113,7 +122,7 @@ jobs:
113122
114123
# 1ES images used on the ARM pool doesn't contain unzip tool, so we need to install it before starting the build
115124
- ${{ if and(eq(parameters.arch, 'arm64'), ne(parameters.os, 'osx')) }}:
116-
- script: sudo apt-get update && sudo apt-get -y install unzip
125+
- script: sudo dnf -y update && sudo dnf -y install unzip
117126
displayName: Install unzip
118127
retryCountOnTaskFailure: 5
119128

@@ -159,9 +168,9 @@ jobs:
159168
- task: UseDotNet@2
160169
displayName: Install .NET Core 6 SDK
161170
inputs:
162-
version: '6.0.418'
163-
packageType: sdk
164-
performMultiLevelLookup: true
171+
version: '6.0.418'
172+
packageType: sdk
173+
performMultiLevelLookup: true
165174
- script: ${{ variables.devCommand }} testl1 Debug ${{ parameters.os }}-${{ parameters.arch }}
166175
workingDirectory: src
167176
displayName: Functional tests
@@ -176,15 +185,6 @@ jobs:
176185
testRunTitle: 'Agent Tests - ${{ parameters.os }}-${{ parameters.arch }}'
177186
condition: always()
178187

179-
# Upload test log
180-
181-
displayName: Publish Test logs
182-
inputs:
183-
pathToPublish: src/Test/TestLogs
184-
artifactName: ${{ parameters.os }}-${{ parameters.arch }}-$(System.JobId)
185-
artifactType: container
186-
condition: always()
187-
188188
# Code coverage
189189
- ${{ if and(parameters.codeCoverage, parameters.unitTests, parameters.functionalTests) }}:
190190
- script: dotnet tool install --global dotnet-reportgenerator-globaltool
@@ -208,7 +208,7 @@ jobs:
208208

209209
- ${{ if parameters.sign }}:
210210
# Signing steps
211-
- template: signing.yml
211+
- template: /.azure-pipelines/signing.yml@self
212212
parameters:
213213
layoutRoot: ${{ variables.layoutRoot }}
214214
isWindows: ${{ eq(parameters.os, 'win') }}
@@ -218,7 +218,7 @@ jobs:
218218

219219
# Package .NET Core Windows dependency (VC++ Redistributable)
220220
- ${{ if eq(parameters.os, 'win') }}:
221-
- template: package-vcredist.yml
221+
- template: /.azure-pipelines/package-vcredist.yml@self
222222
parameters:
223223
layoutRoot: ${{ variables.layoutRoot }}
224224
flavor: ${{ parameters.arch }}
@@ -232,23 +232,6 @@ jobs:
232232
workingDirectory: src
233233
displayName: Hash Package
234234

235-
# Upload agent package zip as build artifact
236-
237-
displayName: Publish Artifact
238-
inputs:
239-
pathToPublish: _package
240-
artifactName: agent
241-
artifactType: container
242-
243-
# Publish agent package hash too
244-
245-
displayName: Publish Artifact
246-
inputs:
247-
pathToPublish: _package_hash
248-
artifactName: hash
249-
artifactType: container
250-
251-
# Signing verification
252235
- ${{ if parameters.verifySigning }}:
253236

254237
# Verify all binaries are signed (generate report)
@@ -263,4 +246,4 @@ jobs:
263246
inputs:
264247
CodesignValidation: true
265248
CodesignValidationBreakOn: WarningAbove
266-
ToolLogsNotFoundAction: Error
249+
ToolLogsNotFoundAction: Error

.azure-pipelines/build-jobs.yml

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool.
2+
13
parameters:
24

35
- name: jobName
@@ -39,9 +41,6 @@ parameters:
3941
type: boolean
4042
default: false
4143

42-
- name: componentDetection
43-
type: boolean
44-
4544
- name: sign
4645
type: boolean
4746

@@ -61,41 +60,39 @@ parameters:
6160
default: false
6261

6362
jobs:
64-
- template: build-job.yml
63+
- template: /.azure-pipelines/build-job.yml@self
64+
parameters:
65+
jobName: ${{ parameters.jobName }}
66+
displayName: ${{ parameters.displayName }}
67+
pool: ${{ parameters.pool }}
68+
container: ${{ parameters.container }}
69+
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
70+
os: ${{ parameters.os }}
71+
arch: ${{ parameters.arch }}
72+
branch: ${{ parameters.branch }}
73+
codeCoverage: ${{ parameters.codeCoverage }}
74+
unitTests: ${{ parameters.unitTests }}
75+
functionalTests: ${{ parameters.functionalTests }}
76+
sign: ${{ parameters.sign }}
77+
verifySigning: ${{ parameters.verifySigning }}
78+
publishArtifact: ${{ parameters.publishArtifacts }}
79+
packageType: agent
80+
81+
- ${{ if parameters.buildAlternatePackage }}:
82+
- template: /.azure-pipelines/build-job.yml@self
6583
parameters:
66-
jobName: ${{ parameters.jobName }}
67-
displayName: ${{ parameters.displayName }}
84+
jobName: ${{ parameters.jobName }}_alternate
85+
displayName: ${{ parameters.displayName }} (without Node 6)
6886
pool: ${{ parameters.pool }}
6987
container: ${{ parameters.container }}
7088
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
7189
os: ${{ parameters.os }}
7290
arch: ${{ parameters.arch }}
7391
branch: ${{ parameters.branch }}
74-
codeCoverage: ${{ parameters.codeCoverage }}
75-
componentDetection: ${{ parameters.componentDetection }}
76-
unitTests: ${{ parameters.unitTests }}
77-
functionalTests: ${{ parameters.functionalTests }}
92+
codeCoverage: false
93+
unitTests: false
94+
functionalTests: false
7895
sign: ${{ parameters.sign }}
7996
verifySigning: ${{ parameters.verifySigning }}
8097
publishArtifact: ${{ parameters.publishArtifacts }}
81-
packageType: agent
82-
83-
- ${{ if parameters.buildAlternatePackage }}:
84-
- template: build-job.yml
85-
parameters:
86-
jobName: ${{ parameters.jobName }}_alternate
87-
displayName: ${{ parameters.displayName }} (without Node 6)
88-
pool: ${{ parameters.pool }}
89-
container: ${{ parameters.container }}
90-
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
91-
os: ${{ parameters.os }}
92-
arch: ${{ parameters.arch }}
93-
branch: ${{ parameters.branch }}
94-
codeCoverage: false
95-
componentDetection: ${{ parameters.componentDetection }}
96-
unitTests: false
97-
functionalTests: false
98-
sign: ${{ parameters.sign }}
99-
verifySigning: ${{ parameters.verifySigning }}
100-
publishArtifact: ${{ parameters.publishArtifacts }}
101-
packageType: pipelines-agent
98+
packageType: pipelines-agent

.azure-pipelines/package-vcredist.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool.
12
parameters:
23
- name: layoutRoot
34
type: string
@@ -19,4 +20,4 @@ steps:
1920
[System.IO.Compression.ZipFile]::ExtractToDirectory($outFile, $unzipDir)
2021
$agentLayoutBin = Join-Path -Path $(Build.SourcesDirectory) -ChildPath "${{ parameters.layoutRoot }}\bin"
2122
Copy-Item -Path $unzipDir -Destination $agentLayoutBin -Force
22-
displayName: Package UCRT
23+
displayName: Package UCRT

0 commit comments

Comments
 (0)