Skip to content

Commit 2851510

Browse files
committed
- Added missing isOfficial in the validation stage.
- Addressed Copilot comments.
1 parent 8e78d0a commit 2851510

7 files changed

Lines changed: 55 additions & 29 deletions

File tree

eng/pipelines/onebranch/jobs/validate-signed-package-job.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ parameters:
88
- name: artifactName
99
type: string
1010

11-
# True if this build is a preview.
12-
- name: isPreview
13-
type: boolean
14-
1511
# True if this build is an official build. This will be used to gate some checks
1612
# that only apply to official builds, such as signature verification.
1713
- name: isOfficial
1814
type: boolean
1915

16+
# True if this build is a preview.
17+
- name: isPreview
18+
type: boolean
19+
2020
jobs:
2121
- job: validate_signed_package
2222
displayName: Verify SqlClient NuGet Package

eng/pipelines/onebranch/jobs/validate-symbols-job.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
# specified in the 'symbolServers' parameter.
1212

1313
parameters:
14+
# True to enable debug information and steps.
15+
- name: debug
16+
type: boolean
17+
1418
# The list of symbol servers to verify against. Each entry has a 'name' (friendly display name)
1519
# and 'url' (the symbol server URL that symchk can query).
1620
- name: symbolServers
@@ -43,8 +47,9 @@ jobs:
4347
extractRoot: $(Build.SourcesDirectory)\symchk_packages
4448

4549
steps:
46-
- script: SET
47-
displayName: Print Environment Variables
50+
- ${{ if parameters.debug }}:
51+
- script: SET
52+
displayName: Print Environment Variables
4853

4954
# ── Download, extract, and verify symbols for each package ──────────────
5055

@@ -55,12 +60,14 @@ jobs:
5560
displayName: Download ${{ pkg.packageName }}
5661

5762
- ${{ each server in parameters.symbolServers }}:
58-
- powershell: >
59-
$(Build.SourcesDirectory)\eng\pipelines\onebranch\jobs\validate-symbols.ps1
60-
-ArtifactPath "$(Pipeline.Workspace)\${{ pkg.artifactName }}"
61-
-ExtractPath "$(extractRoot)\${{ pkg.packageName }}"
62-
-PackageName "${{ pkg.packageName }}"
63-
-DllPath "${{ pkg.dllPath }}"
64-
-SymbolServerUrl "${{ server.url }}"
65-
-SymbolServerName "${{ server.name }}"
63+
- task: PowerShell@2
6664
displayName: Verify ${{ pkg.packageName }} on ${{ server.name }}
65+
inputs:
66+
filePath: eng/pipelines/onebranch/jobs/validate-symbols.ps1
67+
arguments: >
68+
-ArtifactPath "$(Pipeline.Workspace)\${{ pkg.artifactName }}"
69+
-ExtractPath "$(extractRoot)\${{ pkg.packageName }}"
70+
-PackageName "${{ pkg.packageName }}"
71+
-DllPath "${{ pkg.dllPath }}"
72+
-SymbolServerUrl "${{ server.url }}"
73+
-SymbolServerName "${{ server.name }}"

eng/pipelines/onebranch/sqlclient-non-official.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,18 @@ extends:
182182
- template: /eng/pipelines/onebranch/stages/build-stages.yml@self
183183
parameters:
184184
debug: ${{ parameters.debug }}
185+
# This is a non-official pipeline.
186+
isOfficial: false
185187
isPreview: ${{ parameters.isPreview }}
186-
isOfficial: false # This is a non-official pipeline.
187188
publishSymbols: ${{ parameters.publishSymbols }}
188189
buildSqlServerServer: ${{ parameters.buildSqlServerServer }}
189190
buildSqlClient: ${{ parameters.buildSqlClient }}
190191
buildAKVProvider: ${{ parameters.buildAKVProvider }}
191192

192193
- template: /eng/pipelines/onebranch/stages/validation-stage.yml@self
193194
parameters:
195+
debug: ${{ parameters.debug }}
196+
isOfficial: false
194197
isPreview: ${{ parameters.isPreview }}
195198
publishSymbols: ${{ parameters.publishSymbols }}
196199
buildSqlServerServer: ${{ parameters.buildSqlServerServer }}
@@ -200,10 +203,9 @@ extends:
200203
- template: /eng/pipelines/onebranch/stages/release-stage.yml@self
201204
parameters:
202205
debug: ${{ parameters.debug }}
206+
isOfficial: false
203207
# Non-official pipelines always push to the NuGet Test feed.
204208
releaseToProduction: false
205-
# This is _not_ an official pipeline.
206-
isOfficial: false
207209
stageNameSuffix: test
208210
releaseSqlServerServer: ${{ parameters.releaseSqlServerServer }}
209211
releaseLogging: ${{ parameters.releaseLogging }}

eng/pipelines/onebranch/sqlclient-official.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,18 @@ extends:
207207
- template: /eng/pipelines/onebranch/stages/build-stages.yml@self
208208
parameters:
209209
debug: ${{ parameters.debug }}
210+
# This is an official pipeline.
211+
isOfficial: true
210212
isPreview: ${{ parameters.isPreview }}
211-
isOfficial: true # This is an official pipeline.
212213
publishSymbols: ${{ parameters.publishSymbols }}
213214
buildSqlServerServer: ${{ parameters.buildSqlServerServer }}
214215
buildSqlClient: ${{ parameters.buildSqlClient }}
215216
buildAKVProvider: ${{ parameters.buildAKVProvider }}
216217

217218
- template: /eng/pipelines/onebranch/stages/validation-stage.yml@self
218219
parameters:
220+
debug: ${{ parameters.debug }}
221+
isOfficial: true
219222
isPreview: ${{ parameters.isPreview }}
220223
publishSymbols: ${{ parameters.publishSymbols }}
221224
buildSqlServerServer: ${{ parameters.buildSqlServerServer }}
@@ -225,9 +228,8 @@ extends:
225228
- template: /eng/pipelines/onebranch/stages/release-stage.yml@self
226229
parameters:
227230
debug: ${{ parameters.debug }}
228-
releaseToProduction: ${{ parameters.releaseToProduction }}
229-
# This is an official pipeline.
230231
isOfficial: true
232+
releaseToProduction: ${{ parameters.releaseToProduction }}
231233
stageNameSuffix: production
232234
releaseSqlServerServer: ${{ parameters.releaseSqlServerServer }}
233235
releaseLogging: ${{ parameters.releaseLogging }}

eng/pipelines/onebranch/stages/build-stages.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ parameters:
3333
- name: debug
3434
type: boolean
3535

36-
# True if this is a preview build, which uses the preview version numbers from
37-
# common-variables.yml.
38-
- name: isPreview
39-
type: boolean
40-
4136
# True if this is an official build, which runs additional ESRP malware scanning
4237
# and codesigning steps.
4338
- name: isOfficial
4439
type: boolean
4540

41+
# True if this is a preview build, which uses the preview version numbers from
42+
# common-variables.yml.
43+
- name: isPreview
44+
type: boolean
45+
4646
# True to publish symbols to public and private servers.
4747
- name: publishSymbols
4848
type: boolean

eng/pipelines/onebranch/stages/release-stage.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ parameters:
4242
- name: debug
4343
type: boolean
4444

45+
# True for a OneBranch Official pipeline, false for a Non-Official pipeline.
46+
- name: isOfficial
47+
type: boolean
48+
4549
# Controls where packages are pushed during the release stage.
4650
#
4751
# When true, packages are pushed to the NuGet Production feed.
@@ -51,10 +55,6 @@ parameters:
5155
type: boolean
5256
default: false
5357

54-
# True for a OneBranch Official pipeline, false for a Non-Official pipeline.
55-
- name: isOfficial
56-
type: boolean
57-
5858
# The stage name suffix, used in the stage ID (e.g. release_production) and display name.
5959
- name: stageNameSuffix
6060
type: string
@@ -103,6 +103,11 @@ stages:
103103
${{ else }}:
104104
displayName: Release to NuGet Test
105105
dependsOn:
106+
# We always depend on validation. That stage has its own checks to gate execution of the
107+
# validation jobs, so it's safe to depend on it unconditionally.
108+
- validation
109+
# Additionally, we depend on the build stages corresponding to any packages we intend to
110+
# release.
106111
- ${{ if or(parameters.releaseSqlServerServer, parameters.releaseLogging) }}:
107112
- build_independent
108113
- ${{ if parameters.releaseAbstractions }}:

eng/pipelines/onebranch/stages/validation-stage.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@
1717
parameters:
1818
# ── General parameters ─────────────────────────────────────────────────
1919

20+
# True to enable debug information and steps.
21+
- name: debug
22+
type: boolean
23+
24+
# True for a OneBranch Official pipeline, false for a Non-Official pipeline.
25+
- name: isOfficial
26+
type: boolean
27+
2028
# True if this is a preview build.
2129
- name: isPreview
2230
type: boolean
@@ -55,12 +63,14 @@ stages:
5563
- template: /eng/pipelines/onebranch/jobs/validate-signed-package-job.yml@self
5664
parameters:
5765
artifactName: $(sqlClientArtifactsName)
66+
isOfficial: ${{ parameters.isOfficial }}
5867
isPreview: ${{ parameters.isPreview }}
5968

6069
# ── Symbol-server validation ───────────────────────────────────
6170
- ${{ if eq(parameters.publishSymbols, true) }}:
6271
- template: /eng/pipelines/onebranch/jobs/validate-symbols-job.yml@self
6372
parameters:
73+
debug: ${{ parameters.debug }}
6474
packages:
6575
# SqlServer — only when buildSqlServerServer is true.
6676
- ${{ if eq(parameters.buildSqlServerServer, true) }}:

0 commit comments

Comments
 (0)