Skip to content

Commit d904f76

Browse files
pavel-mikula-sonarsourcesonartech
authored and
sonartech
committed
NET-775 Public pipeline: Remove signing
1 parent 165775c commit d904f76

File tree

1 file changed

+2
-64
lines changed

1 file changed

+2
-64
lines changed

azure-pipelines.yml

+2-64
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ variables:
1818
- group: sonar-dotnet-variables
1919
- group: sonarsource-build-variables
2020
- group: artifactory_access
21-
- group: digicert-keylocker
2221
# ~https://github.com/SonarSource/re-ci-images/blob/master/docker/mvn/settings-private.xml
2322
- name: ARTIFACTORY_PRIVATE_USERNAME
2423
value: $[variables.ARTIFACTORY_PRIVATE_READER_USERNAME]
@@ -32,8 +31,6 @@ variables:
3231
value: '$(Build.SourcesDirectory)\coverage'
3332
- name: UnitTestExclusionsPattern
3433
value: 'analyzers/tests/SonarAnalyzer.Test/TestCases/**/*'
35-
- name: isReleaseBranch
36-
value: ${{ or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/heads/branch-')) }}
3734
- name: vsVersion
3835
value: '17.0'
3936

@@ -46,7 +43,6 @@ resources:
4643

4744
stages:
4845
- stage: build
49-
# Build the dotnet analyzers and stage to repox
5046
displayName: 'Build:'
5147
jobs:
5248
- job: dotnetBuildjob
@@ -80,57 +76,13 @@ stages:
8076
msbuildArgs: '/p:Sha1=$(Build.SourceVersion) /p:BranchName=$(Build.SourceBranchName) /p:BuildNumber=$(Build.BuildId) /p:BuildConfiguration=$(BuildConfiguration)'
8177
vsVersion: $(vsVersion)
8278

83-
- task: DownloadSecureFile@1
84-
displayName: 'Download snk file'
85-
name: snk
86-
inputs:
87-
secureFile: SonarSourceSecret.snk
88-
89-
- task: DownloadSecureFile@1
90-
# This file is used by the "DigiCert Signing Manager KSP" Key Storage Provider to authenticate against the DigiCert private key provider server.
91-
displayName: 'Download p12 file'
92-
name: SM_CLIENT_CERT
93-
inputs:
94-
secureFile: digicert_authentication_certificate.p12
95-
96-
- task: DownloadSecureFile@1
97-
# This file contains the signing certificate without the private key. The private key will be downloaded later, during the signing process.
98-
displayName: 'Download crt file'
99-
name: SM_CLIENT_CRT
100-
inputs:
101-
secureFile: cert_525594307.crt
102-
103-
- task: PowerShell@2
104-
displayName: "Signing certificate setup"
105-
# Initialize the DigiCert Private Key Provider.
106-
# What we think it does: The smctl tool authenticates with a client certificate (SM_CLIENT_CERT_FILE) and a client password (SM_CLIENT_CERT_PASSWORD).
107-
# It uses an API Key (SM_API_KEY) and the ID of the certificate (SM_CERT) to check if the authenticated client is authorized to use the
108-
# certificate specified and synchronize (potentially private) information about the certificate.
109-
condition: eq(variables.isReleaseBranch, 'True')
110-
env:
111-
SM_CLIENT_CERT_FILE: $(SM_CLIENT_CERT.secureFilePath)
112-
SM_CLIENT_CERT_PASSWORD: $(SM_CLIENT_CERT_PASSWORD)
113-
SM_API_KEY: $(SM_API_KEY)
114-
SM_CERT: $(SM_CERT)
115-
inputs:
116-
targetType: 'inline'
117-
script: |
118-
Write-Output "smctl sync:"
119-
smctl windows certsync
120-
12179
- task: VSBuild@1
122-
displayName: "Build and sign SonarAnalyzer solution"
123-
env:
124-
SM_CLIENT_CRT_FILE: $(SM_CLIENT_CRT.secureFilePath)
125-
SM_CLIENT_CERT_FILE: $(SM_CLIENT_CERT.secureFilePath)
126-
SM_CLIENT_CERT_PASSWORD: $(SM_CLIENT_CERT_PASSWORD)
127-
SM_API_KEY: $(SM_API_KEY)
128-
SM_CERT: $(SM_CERT)
80+
displayName: "Build SonarAnalyzer solution"
12981
inputs:
13082
solution: '$(solution)'
13183
platform: '$(buildPlatform)'
13284
configuration: '$(buildConfiguration)'
133-
msbuildArgs: '/p:SignAssembly=$(isReleaseBranch) /p:AssemblyOriginatorKeyFile="$(snk.secureFilePath)" /p:Sha1=$(Build.SourceVersion) /p:BuildNumber=$(Build.BuildId) /p:WarningLevel=0'
85+
msbuildArgs: '/p:Sha1=$(Build.SourceVersion) /p:BuildNumber=$(Build.BuildId) /p:WarningLevel=0'
13486
vsVersion: $(vsVersion)
13587

13688
- task: NuGetCommand@2
@@ -143,20 +95,6 @@ stages:
14395
verbosityPack: 'Detailed'
14496
publishPackageMetadata: true
14597

146-
- task: PowerShell@2
147-
displayName: "Sign NuGet packages"
148-
condition: eq(variables.isReleaseBranch, 'True')
149-
env:
150-
PACKAGES_PATH: '$(Build.ArtifactStagingDirectory)\packages\*.nupkg'
151-
SM_CLIENT_CERT_FILE: $(SM_CLIENT_CERT.secureFilePath)
152-
SM_CLIENT_CERT_PASSWORD: $(SM_CLIENT_CERT_PASSWORD)
153-
SM_API_KEY: $(SM_API_KEY)
154-
SM_CERT: $(SM_CERT)
155-
inputs:
156-
targetType: 'inline'
157-
script: |
158-
nuget sign "$env:PACKAGES_PATH" -Overwrite -HashAlgorithm SHA256 -CertificateFingerprint $(SM_CERT_FP) -Timestamper http://timestamp.digicert.com -TimestampHashAlgorithm SHA256
159-
16098
- task: PublishBuildArtifacts@1
16199
displayName: 'Publish NuGet packages as build artifacts'
162100
inputs:

0 commit comments

Comments
 (0)