@@ -24,7 +24,9 @@ parameters:
2424 displayName : ' Execute Veracode SCA'
2525 type : boolean
2626 default : false
27-
27+ variables :
28+ - group : code-signing
29+
2830steps :
2931 - checkout : self
3032 clean : true
@@ -36,12 +38,12 @@ steps:
3638 KeyVaultName : keyvault-build-resources
3739 RunAsPreJob : true
3840 - task : PowerShell@2
39- displayName : PowerShell Script
41+ displayName : ' Veracode SCA Scan '
4042 condition : and(succeeded(), eq('${{ parameters.RUN_VERACODE_SCA }}', 'true'))
4143 inputs :
4244 targetType : inline
4345 script : >
44- $Env:SRCCLR_API_TOKEN="$(SRCCLR_API_TOKEN)"; Set-ExecutionPolicy AllSigned -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://download.srcclr .com/ci.ps1')); srcclr scan .\Src\StackifyLib;
46+ $Env:SRCCLR_API_TOKEN="$(SRCCLR_API_TOKEN)"; Set-ExecutionPolicy AllSigned -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://download.sourceclear .com/ci.ps1')); srcclr scan .\Src\StackifyLib;
4547 - task : DownloadSecureFile@1
4648 name : SNK
4749 displayName : Download Strong Name Key
@@ -71,13 +73,6 @@ steps:
7173 }
7274 displayName: Uncoment signing attribute
7375
74- - task : PowerShell@2
75- displayName : ' Setup Code Signing'
76- inputs :
77- targetType : filePath
78- filePath : ./Scripts/codesign.ps1
79- arguments : ' $(codeSigning2023) $(codeSigning2023-pw)'
80- workingDirectory : $(Build.SourcesDirectory)
8176 - task : DotNetCoreCLI@2
8277 displayName : dotnet restore
8378 inputs :
@@ -101,11 +96,17 @@ steps:
10196 command : pack
10297 searchPatternPack : Src\StackifyLib\*.csproj;
10398 nobuild : true
104- - task : PowerShell @2
105- displayName : ' Sign Nuget Packages '
99+ - task : DotNetCoreCLI @2
100+ continueOnError : true
106101 inputs :
107- targetType : inline
108- script : dotnet nuget sign $(Build.ArtifactStagingDirectory)\*.nupkg --certificate-path $(Build.SourcesDirectory)/certificate.pfx --certificate-password $(codeSigning2023-pw) --timestamper http://timestamp.sectigo.com
102+ command : ' custom'
103+ custom : ' tool'
104+ arguments : ' install --global NuGetKeyVaultSignTool'
105+ displayName : Install NuGetKeyVaultSignTool
106+ - task : CmdLine@2
107+ displayName : ' Sign nuget package'
108+ inputs :
109+ script : NuGetKeyVaultSignTool sign $(Build.ArtifactStagingDirectory)\StackifyLib.signed.*.nupkg -kvu "$(SigningVaultURL)" -kvi "$(SigningAppClientId)" -kvt "$(SigningAppTenantId)" -kvs "$(SigningClientSecret)" -kvc "$(SigningCertName)" -tr http://timestamp.digicert.com
109110 workingDirectory : $(Build.SourcesDirectory)
110111 - task : PowerShell@2
111112 displayName : Rename signed assemblies
0 commit comments