Skip to content

Commit a11dae7

Browse files
authored
Cleanup of AKV Pipeline After ESRP Changes (#3299)
* Cleaning up esrp variables * Make sure signing parameters/variables start with "signing" or "Signing" * Make sure variable group variables are PascalCase * Make sure variables/parameters are whateverCaseThisIsBecauseIForgot * Sort parameter names alphabetically * Add variables yml file for esrp signing variables and add it to akv official pipeline. * Forgot to change a reference to akvname * ConnectedServiceName should be EsrpConnectedServiceName
1 parent 7f45d30 commit a11dae7

File tree

6 files changed

+70
-49
lines changed

6 files changed

+70
-49
lines changed

eng/pipelines/akv-official-pipeline.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ parameters:
3838
variables:
3939
- template: /eng/pipelines/variables/common-variables.yml@self
4040
- template: /eng/pipelines/variables/onebranch-variables.yml@self
41+
- template: /eng/pipelines/variables/esrp-signing-variables.yml@self
4142
- template: /eng/pipelines/variables/akv-official-variables.yml@self
4243

4344
resources:
@@ -133,12 +134,12 @@ extends:
133134
nugetPackageVersion: '${{ variables.nugetPackageVersion }}'
134135
mdsPackageVersion: '${{ variables.mdsPackageVersion }}'
135136
publishSymbols: '${{ parameters.publishSymbols }}'
136-
ESRPConnectedServiceName: '$(ESRPConnectedServiceName)'
137-
AppRegistrationClientId: '$(AppRegistrationClientId)'
138-
AppRegistrationTenantId: '$(AppRegistrationTenantId)'
139-
EsrpClientId: '$(EsrpClientId)'
140-
AuthAkvName: '$(AuthAkvName)'
141-
AuthSignCertName: '$(AuthSignCertName)'
137+
signingAppRegistrationClientId: '$(SigningAppRegistrationClientId)'
138+
signingAppRegistrationTenantId: '$(SigningAppRegistrationTenantId)'
139+
signingAuthAkvName: '$(SigningAuthAkvName)'
140+
signingAuthSignCertName: '$(SigningAuthSignCertName)'
141+
signingEsrpClientId: '$(SigningEsrpClientId)'
142+
signingEsrpConnectedServiceName: '$(SigningEsrpConnectedServiceName)'
142143
symbolsAzureSubscription: '$(SymbolsAzureSubscription)'
143144
symbolsPublishProjectName: '$(SymbolsPublishProjectName)'
144145
symbolsPublishServer: '$(SymbolsPublishServer)'

eng/pipelines/jobs/build-akv-official-job.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,22 @@ parameters:
2626
- name: publishSymbols
2727
type: boolean
2828

29-
- name: ESRPConnectedServiceName
29+
- name: signingAppRegistrationClientId
3030
type: string
3131

32-
- name: AppRegistrationClientId
32+
- name: signingAppRegistrationTenantId
3333
type: string
3434

35-
- name: AppRegistrationTenantId
35+
- name: signingAuthAkvName
3636
type: string
3737

38-
- name: EsrpClientId
38+
- name: signingAuthSignCertName
3939
type: string
4040

41-
- name: AuthAkvName
41+
- name: signingEsrpClientId
4242
type: string
4343

44-
- name: AuthSignCertName
44+
- name: signingEsrpConnectedServiceName
4545
type: string
4646

4747
- name: symbolsAzureSubscription
@@ -108,13 +108,13 @@ jobs:
108108

109109
- template: ../steps/compound-esrp-code-signing-step.yml@self
110110
parameters:
111-
ESRPConnectedServiceName: '${{ parameters.ESRPConnectedServiceName }}'
112-
appRegistrationClientId: '${{ parameters.AppRegistrationClientId }}'
113-
appRegistrationTenantId: '${{ parameters.AppRegistrationTenantId }}'
114-
EsrpClientId: '${{ parameters.EsrpClientId }}'
115-
AuthAkvName: '${{ parameters.AuthAkvName }}'
116-
AuthSignCertName: '${{ parameters.AuthSignCertName }}'
111+
appRegistrationClientId: '${{ parameters.signingAppRegistrationClientId }}'
112+
appRegistrationTenantId: '${{ parameters.signingAppRegistrationTenantId }}'
117113
artifactType: 'dll'
114+
authAkvName: '${{ parameters.signingAuthAkvName }}'
115+
authSignCertName: '${{ parameters.signingAuthSignCertName }}'
116+
esrpClientId: '${{ parameters.signingEsrpClientId }}'
117+
esrpConnectedServiceName: '${{ parameters.signingEsrpConnectedServiceName }}'
118118

119119
- template: ../steps/compound-nuget-pack-step.yml@self
120120
parameters:
@@ -127,13 +127,13 @@ jobs:
127127

128128
- template: ../steps/compound-esrp-code-signing-step.yml@self
129129
parameters:
130-
ESRPConnectedServiceName: '${{ parameters.ESRPConnectedServiceName }}'
131-
appRegistrationClientId: '${{ parameters.AppRegistrationClientId }}'
132-
appRegistrationTenantId: '${{ parameters.AppRegistrationTenantId }}'
133-
EsrpClientId: '${{ parameters.EsrpClientId }}'
134-
AuthAkvName: '${{ parameters.AuthAkvName }}'
135-
AuthSignCertName: '${{ parameters.AuthSignCertName }}'
130+
appRegistrationClientId: '${{ parameters.signingAppRegistrationClientId }}'
131+
appRegistrationTenantId: '${{ parameters.signingAppRegistrationTenantId }}'
136132
artifactType: 'pkg'
133+
authAkvName: '${{ parameters.signingAuthAkvName }}'
134+
authSignCertName: '${{ parameters.signingAuthSignCertName }}'
135+
esrpClientId: '${{ parameters.signingEsrpClientId }}'
136+
esrpConnectedServiceName: '${{ parameters.signingEsrpConnectedServiceName }}'
137137

138138
- ${{ if parameters.publishSymbols }}:
139139
- template: ../steps/compound-publish-symbols-step.yml@self

eng/pipelines/steps/compound-esrp-code-signing-step.yml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,15 @@
55
#################################################################################
66

77
parameters:
8-
- name: ESRPConnectedServiceName
9-
type: string
10-
118
- name: appRegistrationClientId
129
type: string
1310

1411
- name: appRegistrationTenantId
1512
type: string
1613

17-
- name: EsrpClientId
18-
type: string
19-
20-
- # Name of the Azure Key Vault to retrieve ESRP Code Signing certificate from.
21-
name: AuthAkvName
14+
- # Name of the Azure Key Vault to retrieve certificates from.
15+
# note: This has nothing to do with the AKV provider package.
16+
name: authAkvName
2217
type: string
2318

2419
- name: authSignCertName
@@ -30,34 +25,40 @@ parameters:
3025
- dll
3126
- pkg
3227

28+
- name: esrpConnectedServiceName
29+
type: string
30+
31+
- name: esrpClientId
32+
type: string
33+
3334
steps:
3435
- ${{ if eq(parameters.artifactType, 'dll') }}:
3536
- task: EsrpMalwareScanning@5
3637
displayName: 'ESRP Malware Scanning Code'
3738
inputs:
38-
ConnectedServiceName: '${{ parameters.ESRPConnectedServiceName }}'
3939
AppRegistrationClientId: '${{ parameters.appRegistrationClientId }}'
4040
AppRegistrationTenantId: '${{ parameters.appRegistrationTenantId }}'
41-
EsrpClientId: '${{ parameters.EsrpClientId }}'
42-
UseMSIAuthentication: true
4341
CleanupTempStorage: 1
42+
ConnectedServiceName: '${{ parameters.esrpConnectedServiceName }}'
43+
EsrpClientId: '${{ parameters.esrpClientId }}'
4444
FolderPath: '$(BUILD_OUTPUT)'
4545
Pattern: '*.dll'
46+
UseMSIAuthentication: true
4647
VerboseLogin: 1
4748

4849
- task: EsrpCodeSigning@5
4950
displayName: 'ESRP Signing Code'
5051
inputs:
51-
ConnectedServiceName: '${{ parameters.ESRPConnectedServiceName }}'
5252
AppRegistrationClientId: '${{ parameters.appRegistrationClientId }}'
5353
AppRegistrationTenantId: '${{ parameters.appRegistrationTenantId }}'
54-
EsrpClientId: '${{ parameters.EsrpClientId }}'
55-
UseMSIAuthentication: true
56-
AuthAKVName: '${{ parameters.akvName }}'
57-
AuthSignCertName: '${{ parameters.AuthSignCertName }}'
54+
AuthAKVName: '${{ parameters.authAkvName }}'
55+
AuthSignCertName: '${{ parameters.authSignCertName }}'
56+
ConnectedServiceName: '${{ parameters.esrpConnectedServiceName }}'
57+
EsrpClientId: '${{ parameters.esrpClientId }}'
5858
FolderPath: '$(BUILD_OUTPUT)'
5959
Pattern: '*.dll'
6060
signConfigType: 'inlineSignParams'
61+
UseMSIAuthentication: true
6162
inlineOperation: |
6263
[
6364
{
@@ -102,29 +103,29 @@ steps:
102103
- task: EsrpMalwareScanning@5
103104
displayName: 'ESRP Malware Scanning NuGet Package'
104105
inputs:
105-
ConnectedServiceName: '${{ parameters.ESRPConnectedServiceName }}'
106106
AppRegistrationClientId: '${{ parameters.appRegistrationClientId }}'
107107
AppRegistrationTenantId: '${{ parameters.appRegistrationTenantId }}'
108-
EsrpClientId: '${{ parameters.EsrpClientId }}'
109-
UseMSIAuthentication: true
110108
CleanupTempStorage: 1
109+
ConnectedServiceName: '${{ parameters.esrpConnectedServiceName }}'
110+
EsrpClientId: '${{ parameters.esrpClientId }}'
111111
FolderPath: '$(ARTIFACT_PATH)'
112112
Pattern: '*.*nupkg'
113+
UseMSIAuthentication: true
113114
VerboseLogin: 1
114115

115116
- task: EsrpCodeSigning@5
116117
displayName: 'ESRP Signing NuGet Package'
117118
inputs:
118-
ConnectedServiceName: '${{ parameters.ESRPConnectedServiceName }}'
119119
AppRegistrationClientId: '${{ parameters.appRegistrationClientId }}'
120120
AppRegistrationTenantId: '${{ parameters.appRegistrationTenantId }}'
121-
EsrpClientId: '${{ parameters.EsrpClientId }}'
122-
UseMSIAuthentication: true
123-
AuthAKVName: '${{ parameters.akvName }}'
124-
AuthSignCertName: '${{ parameters.AuthSignCertName }}'
121+
ConnectedServiceName: '${{ parameters.esrpConnectedServiceName }}'
122+
EsrpClientId: '${{ parameters.esrpClientId }}'
123+
AuthAKVName: '${{ parameters.authAkvName }}'
124+
AuthSignCertName: '${{ parameters.authSignCertName }}'
125125
FolderPath: '$(ARTIFACT_PATH)'
126126
Pattern: '*.*nupkg'
127127
signConfigType: 'inlineSignParams'
128+
UseMSIAuthentication: true
128129
inlineOperation: |
129130
[
130131
{

eng/pipelines/variables/akv-official-variables.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
# @TODO: These seem to only really apply to official builds. Name should probably be adjusted to match.
88

99
variables:
10-
# @TODO: Rename to something more appropriate for symbols
10+
# @TODO: If symbols variables are indeed shared between projects and not expected to change
11+
# then they can be removed from this variable group.
1112
- group: 'akv-variables-v2'
1213
# SymbolsAzureSubscription
1314
# SymbolsPublishProjectName
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#################################################################################
2+
# Licensed to the .NET Foundation under one or more agreements. #
3+
# The .NET Foundation licenses this file to you under the MIT license. #
4+
# See the LICENSE file in the project root for more information. #
5+
#################################################################################
6+
7+
# These variables are used for running ESRP signing tasks. All names start with "Signing" to make
8+
# it clear that these variables are used for signing (as opposed to other msc tasks).
9+
10+
variables:
11+
- group: 'esrp-variables-v2'
12+
# SigningAppRegistrationClientId
13+
# SigningAppRegistrationTenantId
14+
# SigningAuthAkvName
15+
# SigningAuthSignCertName
16+
# SigningEsrpClientId
17+
# SigningEsrpConnectedServiceName

src/Microsoft.Data.SqlClient.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "variables", "variables", "{
289289
..\eng\pipelines\variables\akv-official-variables.yml = ..\eng\pipelines\variables\akv-official-variables.yml
290290
..\eng\pipelines\variables\common-variables.yml = ..\eng\pipelines\variables\common-variables.yml
291291
..\eng\pipelines\variables\onebranch-variables.yml = ..\eng\pipelines\variables\onebranch-variables.yml
292+
..\eng\pipelines\variables\esrp-signing-variables.yml = ..\eng\pipelines\variables\esrp-signing-variables.yml
292293
EndProjectSection
293294
EndProject
294295
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "jobs", "jobs", "{09352F1D-878F-4F55-8AA2-6E47F1AD37D5}"

0 commit comments

Comments
 (0)