Skip to content

Commit fd56d32

Browse files
authored
Get the OneBranch Official pipeline working (#3994)
1 parent e7b01c6 commit fd56d32

30 files changed

Lines changed: 535 additions & 619 deletions

.github/instructions/onebranch-pipeline-design.instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ The release stage is gated and only executes on demand when at least one release
189189
- **Publish jobs**: Each package has a conditional publish job that is included at compile time only when its parameter is `true`:
190190
```yaml
191191
- ${{ if eq(parameters.releaseXxx, true) }}:
192-
- template: /eng/pipelines/common/templates/jobs/publish-nuget-package-job.yml@self
192+
- template: /eng/pipelines/onebranch/jobs/publish-nuget-package-job.yml@self
193193
```
194194
- **Environment variables**: Stage sets `ob_release_usedeploymentjob: true` for OneBranch integration:
195195
- Official: `ob_release_environment: 'NuGet-Production'`
@@ -308,7 +308,7 @@ parameters:
308308
type: boolean
309309
default: false
310310
311-
- name: releaseExtAzure
311+
- name: releaseAzure
312312
displayName: 'Release Microsoft.Data.SqlClient.Extensions.Azure'
313313
type: boolean
314314
default: false

eng/pipelines/common/templates/jobs/run-tests-package-reference-job.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

eng/pipelines/libraries/build-variables.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

eng/pipelines/jobs/build-akv-official-job.yml renamed to eng/pipelines/onebranch/jobs/build-akv-official-job.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
ob_sdl_apiscan_versionNumber: '${{ parameters.akvAssemblyFileVersion }}'
9595

9696
steps:
97-
- template: /eng/pipelines/steps/script-output-environment-variables-step.yml@self
97+
- template: /eng/pipelines/onebranch/steps/script-output-environment-variables-step.yml@self
9898

9999
- powershell: |
100100
$jsonParams = '${{ convertToJson(parameters) }}' -replace '\\', '\\'
@@ -121,15 +121,15 @@ jobs:
121121

122122
# Perform analysis before building, since this step will clobber build
123123
# output.
124-
- template: /eng/pipelines/steps/roslyn-analyzers-akv-step.yml@self
124+
- template: /eng/pipelines/onebranch/steps/roslyn-analyzers-akv-step.yml@self
125125
parameters:
126126
akvPackageVersion: '${{ parameters.akvPackageVersion }}'
127127
buildConfiguration: '${{ parameters.buildConfiguration }}'
128128
mdsPackageVersion: '${{ parameters.mdsPackageVersion }}'
129129
loggingPackageVersion: '${{ parameters.loggingPackageVersion }}'
130130
abstractionsPackageVersion: '${{ parameters.abstractionsPackageVersion }}'
131131

132-
- template: /eng/pipelines/steps/compound-build-akv-step.yml@self
132+
- template: /eng/pipelines/onebranch/steps/compound-build-akv-step.yml@self
133133
parameters:
134134
akvAssemblyFileVersion: '${{ parameters.akvAssemblyFileVersion }}'
135135
akvPackageVersion: '${{ parameters.akvPackageVersion }}'
@@ -139,15 +139,15 @@ jobs:
139139
abstractionsPackageVersion: '${{ parameters.abstractionsPackageVersion }}'
140140

141141
- ${{ each targetFramework in parameters.targetFrameworks }}:
142-
- template: /eng/pipelines/steps/compound-extract-akv-apiscan-files-step.yml@self
142+
- template: /eng/pipelines/onebranch/steps/compound-extract-akv-apiscan-files-step.yml@self
143143
parameters:
144144
buildConfiguration: '${{ parameters.buildConfiguration }}'
145145
dllPath: '${{ parameters.apiScanDllPath }}'
146146
pdbPath: '${{ parameters.apiScanPdbPath }}'
147147
referenceType: Package
148148
targetFramework: '${{ targetFramework }}'
149149

150-
- template: /eng/pipelines/steps/compound-esrp-dll-signing-step.yml@self
150+
- template: /eng/pipelines/onebranch/steps/compound-esrp-dll-signing-step.yml@self
151151
parameters:
152152
appRegistrationClientId: '${{ parameters.appRegistrationClientId }}'
153153
appRegistrationTenantId: '${{ parameters.appRegistrationTenantId }}'
@@ -157,7 +157,7 @@ jobs:
157157
esrpConnectedServiceName: '${{ parameters.esrpConnectedServiceName }}'
158158
pattern: 'Microsoft.Data.SqlClient.AlwaysEncrypted.*.dll'
159159

160-
- template: /eng/pipelines/steps/compound-nuget-pack-step.yml@self
160+
- template: /eng/pipelines/onebranch/steps/compound-nuget-pack-step.yml@self
161161
parameters:
162162
buildConfiguration: '${{ parameters.buildConfiguration }}'
163163
generateSymbolsPackage: true # Always generate symbols, even if they are not published
@@ -167,7 +167,7 @@ jobs:
167167
referenceType: Package
168168
properties: MdsPackageVersion=${{ parameters.mdsPackageVersion }};LoggingPackageVersion=${{ parameters.loggingPackageVersion }};AbstractionsPackageVersion=${{ parameters.abstractionsPackageVersion }}
169169

170-
- template: /eng/pipelines/steps/compound-esrp-nuget-signing-step.yml@self
170+
- template: /eng/pipelines/onebranch/steps/compound-esrp-nuget-signing-step.yml@self
171171
parameters:
172172
appRegistrationClientId: '${{ parameters.appRegistrationClientId }}'
173173
appRegistrationTenantId: '${{ parameters.appRegistrationTenantId }}'
@@ -177,7 +177,7 @@ jobs:
177177
esrpConnectedServiceName: '${{ parameters.esrpConnectedServiceName }}'
178178

179179
- ${{ if parameters.publishSymbols }}:
180-
- template: /eng/pipelines/steps/compound-publish-symbols-step.yml@self
180+
- template: /eng/pipelines/onebranch/steps/compound-publish-symbols-step.yml@self
181181
parameters:
182182
artifactName: 'akv_symbols_$(System.TeamProject)_$(Build.Repository.Name)_$(Build.SourceBranchName)_${{ parameters.akvPackageVersion }}_$(System.TimelineId)'
183183
azureSubscription: '${{ parameters.symbolsAzureSubscription }}'

eng/pipelines/jobs/build-signed-csproj-package-job.yml renamed to eng/pipelines/onebranch/jobs/build-signed-csproj-package-job.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
packTarget: ${{ coalesce(parameters.packTarget, format('Pack{0}', parameters.packageName)) }}
115115

116116
steps:
117-
- template: /eng/pipelines/steps/script-output-environment-variables-step.yml@self
117+
- template: /eng/pipelines/onebranch/steps/script-output-environment-variables-step.yml@self
118118

119119
# Download any pipeline artifacts this package depends on.
120120
- ${{ each artifact in parameters.downloadArtifacts }}:
@@ -143,14 +143,14 @@ jobs:
143143
setupCommandLinePicker: vs2022
144144

145145
# Build the package, producing DLLs only (no NuGet package yet).
146-
- template: /eng/pipelines/steps/compound-build-csproj-step.yml@self
146+
- template: /eng/pipelines/onebranch/steps/compound-build-csproj-step.yml@self
147147
parameters:
148148
buildTarget: $(buildTarget)
149149
buildConfiguration: ${{ parameters.buildConfiguration }}
150150
versionProperties: ${{ parameters.versionProperties }}
151151

152152
# ESRP sign the DLLs.
153-
- template: /eng/pipelines/steps/compound-esrp-dll-signing-step.yml@self
153+
- template: /eng/pipelines/onebranch/steps/compound-esrp-dll-signing-step.yml@self
154154
parameters:
155155
appRegistrationClientId: ${{ parameters.appRegistrationClientId }}
156156
appRegistrationTenantId: ${{ parameters.appRegistrationTenantId }}
@@ -181,14 +181,14 @@ jobs:
181181
flattenFolders: false
182182

183183
# Pack the signed DLLs into NuGet package (NoBuild=true).
184-
- template: /eng/pipelines/steps/compound-pack-csproj-step.yml@self
184+
- template: /eng/pipelines/onebranch/steps/compound-pack-csproj-step.yml@self
185185
parameters:
186186
packTarget: $(packTarget)
187187
buildConfiguration: ${{ parameters.buildConfiguration }}
188188
versionProperties: ${{ parameters.versionProperties }}
189189

190190
# ESRP sign the NuGet package.
191-
- template: /eng/pipelines/steps/compound-esrp-nuget-signing-step.yml@self
191+
- template: /eng/pipelines/onebranch/steps/compound-esrp-nuget-signing-step.yml@self
192192
parameters:
193193
appRegistrationClientId: ${{ parameters.appRegistrationClientId }}
194194
appRegistrationTenantId: ${{ parameters.appRegistrationTenantId }}
@@ -199,7 +199,7 @@ jobs:
199199

200200
# Publish symbols to servers
201201
- ${{ if eq(parameters.publishSymbols, true) }}:
202-
- template: /eng/pipelines/common/templates/steps/publish-symbols-step.yml@self
202+
- template: /eng/pipelines/onebranch/steps/publish-symbols-step.yml@self
203203
parameters:
204204
packageFullName: ${{ parameters.packageFullName }}
205205
packageVersion: ${{ parameters.packageVersion }}

eng/pipelines/common/templates/jobs/build-signed-package-job.yml renamed to eng/pipelines/onebranch/jobs/build-signed-sqlclient-package-job.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ jobs:
6868
msbuildArguments: -t:BuildTools
6969

7070
# Perform analysis before building, since this step will clobber build output.
71-
- template: /eng/pipelines/common/templates/steps/code-analyze-step.yml@self
71+
- template: /eng/pipelines/onebranch/steps/code-analyze-step.yml@self
7272

7373
# Build MDS, producing signed DLLs.
74-
- template: /eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml@self
74+
- template: /eng/pipelines/onebranch/steps/build-all-configurations-signed-dlls-step.yml@self
7575
parameters:
7676
# These variables are sourced from common-variables.yml.
7777
abstractionsAssemblyFileVersion: $(abstractionsAssemblyFileVersion)
@@ -81,7 +81,7 @@ jobs:
8181
mdsAssemblyFileVersion: $(mdsAssemblyFileVersion)
8282
mdsPackageVersion: $(mdsPackageVersion)
8383

84-
- template: /eng/pipelines/common/templates/steps/esrp-code-signing-step.yml@self
84+
- template: /eng/pipelines/onebranch/steps/esrp-code-signing-step.yml@self
8585
parameters:
8686
artifactType: dll
8787

@@ -97,7 +97,7 @@ jobs:
9797
properties: 'AbstractionsPackageVersion=$(abstractionsPackageVersion);LoggingPackageVersion=$(loggingPackageVersion)'
9898
referenceType: Package
9999

100-
- template: /eng/pipelines/common/templates/steps/esrp-code-signing-step.yml@self
100+
- template: /eng/pipelines/onebranch/steps/esrp-code-signing-step.yml@self
101101
parameters:
102102
artifactType: pkg
103103

@@ -123,7 +123,7 @@ jobs:
123123

124124
# Publish symbols to servers
125125
- ${{ if eq(parameters.publishSymbols, true) }}:
126-
- template: /eng/pipelines/common/templates/steps/publish-symbols-step.yml@self
126+
- template: /eng/pipelines/onebranch/steps/publish-symbols-step.yml@self
127127
parameters:
128128
packageFullName: Microsoft.Data.SqlClient
129129
packageVersion: $(mdsPackageVersion)

eng/pipelines/common/templates/jobs/publish-nuget-package-job.yml renamed to eng/pipelines/onebranch/jobs/publish-nuget-package-job.yml

File renamed without changes.

eng/pipelines/common/templates/jobs/validate-signed-package-job.yml renamed to eng/pipelines/onebranch/jobs/validate-signed-package-job.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
vmImage: 'ADO-MMS22-SQL19'
2525

2626
variables: # More settings at https://aka.ms/obpipelines/yaml/jobs
27-
- template: /eng/pipelines/libraries/mds-validation-variables.yml@self
27+
- template: /eng/pipelines/onebranch/variables/sqlclient-validation-variables.yml@self
2828

2929
- name: pathToDownloadedNuget # path to the downloaded nuget files
3030
value: $(Pipeline.Workspace)\${{parameters.artifactName }}

eng/pipelines/dotnet-sqlclient-non-official-pipeline.yml renamed to eng/pipelines/onebranch/sqlclient-non-official.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ parameters:
8484
default: false
8585

8686
# Release the Microsoft.Data.SqlClient.Extensions.Azure package.
87-
- name: releaseExtAzure
87+
- name: releaseAzure
8888
displayName: Release Microsoft.Data.SqlClient.Extensions.Azure
8989
type: boolean
9090
default: false
@@ -96,7 +96,7 @@ parameters:
9696
default: false
9797

9898
variables:
99-
- template: /eng/pipelines/libraries/onebranch-variables.yml@self
99+
- template: /eng/pipelines/onebranch/variables/onebranch-variables.yml@self
100100

101101
resources:
102102
repositories:
@@ -157,22 +157,27 @@ extends:
157157
tsaOptionsPath: $(REPO_ROOT)\.config\tsaoptions.json
158158
disableLegacyManifest: true
159159
stages:
160-
- template: /eng/pipelines/stages/sqlclient-onebranch-stages.yml@self
160+
- template: /eng/pipelines/onebranch/stages/build-stages.yml@self
161161
parameters:
162162
debug: ${{ parameters.debug }}
163-
# This is not an official pipeline.
164-
isOfficial: false
165163
isPreview: ${{ parameters.isPreview }}
166164
publishSymbols: ${{ parameters.publishSymbols }}
167-
# Non-Official pipelines must always be a dry-run.
168-
releaseDryRun: true
169-
testJobTimeout: ${{ parameters.testJobTimeout }}
170165
buildSqlServerServer: ${{ parameters.buildSqlServerServer }}
171166
buildSqlClient: ${{ parameters.buildSqlClient }}
172167
buildAKVProvider: ${{ parameters.buildAKVProvider }}
168+
169+
- template: /eng/pipelines/onebranch/stages/release-stages.yml@self
170+
parameters:
171+
debug: ${{ parameters.debug }}
172+
# Non-official pipelines must always be a dry run.
173+
isDryRun: true
174+
# This is _not_ official pipeline.
175+
isOfficial: false
176+
stageNameSuffix: test
177+
stageDisplayName: Release Test (Dry Run)
173178
releaseSqlServerServer: ${{ parameters.releaseSqlServerServer }}
174179
releaseLogging: ${{ parameters.releaseLogging }}
175180
releaseAbstractions: ${{ parameters.releaseAbstractions }}
176181
releaseSqlClient: ${{ parameters.releaseSqlClient }}
177-
releaseExtAzure: ${{ parameters.releaseExtAzure }}
182+
releaseAzure: ${{ parameters.releaseAzure }}
178183
releaseAKVProvider: ${{ parameters.releaseAKVProvider }}

eng/pipelines/dotnet-sqlclient-official-pipeline.yml renamed to eng/pipelines/onebranch/sqlclient-official.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ parameters:
105105
default: false
106106

107107
# Release the Microsoft.Data.SqlClient.Extensions.Azure package.
108-
- name: releaseExtAzure
108+
- name: releaseAzure
109109
displayName: Release Microsoft.Data.SqlClient.Extensions.Azure
110110
type: boolean
111111
default: false
@@ -117,7 +117,7 @@ parameters:
117117
default: false
118118

119119
variables:
120-
- template: /eng/pipelines/libraries/onebranch-variables.yml@self
120+
- template: /eng/pipelines/onebranch/variables/onebranch-variables.yml@self
121121

122122
resources:
123123
repositories:
@@ -182,21 +182,29 @@ extends:
182182
tsaOptionsPath: $(REPO_ROOT)\.config\tsaoptions.json
183183
disableLegacyManifest: true
184184
stages:
185-
- template: /eng/pipelines/stages/sqlclient-onebranch-stages.yml@self
185+
- template: /eng/pipelines/onebranch/stages/build-stages.yml@self
186186
parameters:
187187
debug: ${{ parameters.debug }}
188-
# This is an official pipeline.
189-
isOfficial: true
190188
isPreview: ${{ parameters.isPreview }}
191189
publishSymbols: ${{ parameters.publishSymbols }}
192-
releaseDryRun: ${{ parameters.releaseDryRun }}
193-
testJobTimeout: ${{ parameters.testJobTimeout }}
194190
buildSqlServerServer: ${{ parameters.buildSqlServerServer }}
195191
buildSqlClient: ${{ parameters.buildSqlClient }}
196192
buildAKVProvider: ${{ parameters.buildAKVProvider }}
193+
194+
- template: /eng/pipelines/onebranch/stages/release-stages.yml@self
195+
parameters:
196+
debug: ${{ parameters.debug }}
197+
isDryRun: ${{ parameters.releaseDryRun }}
198+
# This is an official pipeline.
199+
isOfficial: true
200+
stageNameSuffix: production
201+
${{ if eq(parameters.releaseDryRun, true) }}:
202+
stageDisplayName: Release Production (Dry Run)
203+
${{ else }}:
204+
stageDisplayName: Release Production
197205
releaseSqlServerServer: ${{ parameters.releaseSqlServerServer }}
198206
releaseLogging: ${{ parameters.releaseLogging }}
199207
releaseAbstractions: ${{ parameters.releaseAbstractions }}
200208
releaseSqlClient: ${{ parameters.releaseSqlClient }}
201-
releaseExtAzure: ${{ parameters.releaseExtAzure }}
209+
releaseAzure: ${{ parameters.releaseAzure }}
202210
releaseAKVProvider: ${{ parameters.releaseAKVProvider }}

0 commit comments

Comments
 (0)