1- # Azure Pipelines
2- # https://aka.ms/yaml
3-
41name : RecursiveExtractor_Release_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
5- # trigger:
6- # batch: true
7- # branches:
8- # include:
9- # - main
10- # paths:
11- # include:
12- # - RecursiveExtractor
13- # - RecursiveExtractor.Cli
14- # pr: none
152trigger : none
163pr : none
174
185resources :
196 repositories :
207 - repository : templates
218 type : git
22- name : SecurityEngineering /OSS-Tools-Pipeline-Templates
9+ name : Data /OSS-Tools-Pipeline-Templates
2310 ref : refs/tags/v2.0.0
2411 - repository : 1esPipelines
2512 type : git
2613 name : 1ESPipelineTemplates/1ESPipelineTemplates
2714 ref : refs/tags/release
28-
15+
2916variables :
3017 BuildConfiguration : ' Release'
3118 DotnetVersion : ' 8.0.x'
@@ -40,6 +27,10 @@ extends:
4027 sdl :
4128 armory :
4229 enabled : false
30+ sourceRepositoriesToScan :
31+ exclude :
32+ - repository : 1esPipelines
33+ - repository : templates
4334 stages :
4435 - stage : Test
4536 dependsOn : []
@@ -87,3 +78,93 @@ extends:
8778 artifactName : ' cli-archive'
8879 preBuild :
8980 - template : nbgv-set-version-steps.yml@templates
81+
82+ - stage : Release
83+ dependsOn :
84+ - Build
85+ condition : succeeded()
86+ jobs :
87+ - job : sign_hash_release
88+ displayName : Code Sign, Generate Hashes, Publish Public Releases
89+ templateContext :
90+ outputs :
91+ - output : pipelineArtifact
92+ path : ' $(Build.StagingDirectory)'
93+ artifact : ' Signed_Binaries_$(System.JobId)_$(System.JobAttempt)'
94+ steps :
95+ - task : UseDotNet@2
96+ inputs :
97+ packageType : ' sdk'
98+ version : ' 6.0.x' # ESRP requires a specific version.
99+ - template : nbgv-set-version-steps.yml@templates
100+ - task : DownloadPipelineArtifact@2
101+ inputs :
102+ displayName : ' Download lib-archive'
103+ buildType : ' current'
104+ artifactName : ' lib-archive'
105+ targetPath : $(Build.BinariesDirectory)\Unsigned_Binaries\
106+ - task : DownloadPipelineArtifact@2
107+ inputs :
108+ displayName : ' Download cli-archive'
109+ buildType : ' current'
110+ artifactName : ' cli-archive'
111+ targetPath : $(Build.BinariesDirectory)\Unsigned_Binaries\
112+ - task : ExtractFiles@1
113+ displayName : Extract Artifacts for Signing
114+ inputs :
115+ archiveFilePatterns : ' $(Build.BinariesDirectory)\Unsigned_Binaries\*.zip'
116+ destinationFolder : ' $(Build.BinariesDirectory)'
117+ cleanDestinationFolder : false
118+ overwriteExistingFiles : true
119+ - task : AntiMalware@4
120+ displayName : Anti-Malware Scan
121+ inputs :
122+ InputType : ' Basic'
123+ ScanType : ' CustomScan'
124+ FileDirPath : ' $(Build.BinariesDirectory)'
125+ EnableServices : true
126+ SupportLogOnError : true
127+ TreatSignatureUpdateFailureAs : ' Warning'
128+ SignatureFreshness : ' UpToDate'
129+ TreatStaleSignatureAs : ' Warning'
130+ - task : EsrpCodeSigning@5
131+ displayName : Code Sign Nuget Packages
132+ inputs :
133+ ConnectedServiceName : ' oss-esrp-signing-recext-v5-connection'
134+ AppRegistrationClientId : ' caf746ee-b288-4155-8cc0-0bedca65f230'
135+ AppRegistrationTenantId : ' 33e01921-4d64-4f8c-a055-5bdaffd5e33d'
136+ AuthAKVName : ' oss-signing-vault'
137+ AuthCertName : ' oss-recursive-auth-cert'
138+ AuthSignCertName : ' oss-recursive-signing-cert'
139+ FolderPath : ' $(Build.BinariesDirectory)'
140+ Pattern : ' *.nupkg, *.snupkg'
141+ signConfigType : ' inlineSignParams'
142+ inlineOperation : |
143+ [
144+ {
145+ "KeyCode" : "CP-401405",
146+ "OperationCode" : "NuGetSign",
147+ "Parameters" : {},
148+ "ToolName" : "sign",
149+ "ToolVersion" : "1.0"
150+ },
151+ {
152+ "KeyCode" : "CP-401405",
153+ "OperationCode" : "NuGetVerify",
154+ "Parameters" : {},
155+ "ToolName" : "sign",
156+ "ToolVersion" : "1.0"
157+ }
158+ ]
159+ SessionTimeout : ' 60'
160+ MaxConcurrency : ' 50'
161+ MaxRetryAttempts : ' 5'
162+ - powershell : ' Get-ChildItem -Path '' $(Build.BinariesDirectory)'' -Recurse CodeSign* | foreach { Remove-Item -Path $_.FullName }'
163+ displayName : ' Delete Code Sign Summaries'
164+ - task : PowerShell@2
165+ displayName : Move NuGet Packages
166+ inputs :
167+ targetType : ' inline'
168+ script : |
169+ mv $env:BUILD_BINARIESDIRECTORY/*.nupkg $env:BUILD_STAGINGDIRECTORY/
170+ mv $env:BUILD_BINARIESDIRECTORY/*.snupkg $env:BUILD_STAGINGDIRECTORY/
0 commit comments