|
2 | 2 | # https://aka.ms/yaml |
3 | 3 |
|
4 | 4 | name: 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 |
| 5 | +# trigger: |
| 6 | +# batch: true |
| 7 | +# branches: |
| 8 | +# include: |
| 9 | +# - main |
| 10 | +# paths: |
| 11 | +# include: |
| 12 | +# - RecursiveExtractor |
| 13 | +# - RecursiveExtractor.Cli |
| 14 | +# pr: none |
| 15 | +trigger: none |
14 | 16 | pr: none |
15 | 17 |
|
16 | 18 | resources: |
17 | 19 | repositories: |
18 | 20 | - repository: templates |
19 | 21 | type: git |
20 | 22 | name: SecurityEngineering/OSS-Tools-Pipeline-Templates |
21 | | - ref: refs/tags/v1.1.1 |
22 | | - |
| 23 | + ref: refs/tags/v2.0.0 |
| 24 | + - repository: 1esPipelines |
| 25 | + type: git |
| 26 | + name: 1ESPipelineTemplates/1ESPipelineTemplates |
| 27 | + ref: refs/tags/release |
| 28 | + |
23 | 29 | variables: |
24 | 30 | BuildConfiguration: 'Release' |
25 | 31 | DotnetVersion: '8.0.x' |
26 | 32 |
|
27 | | -stages: |
28 | | -- stage: Test |
29 | | - dependsOn: [] |
30 | | - jobs: |
31 | | - - template: dotnet-test-job.yml@templates |
32 | | - parameters: |
33 | | - jobName: 'lib_dotnet_test_windows' |
34 | | - dotnetVersions: ['6.0.x','7.0.x','8.0.x'] |
35 | | - vmImage: 'win2022-image-base' |
36 | | - projectPath: 'RecursiveExtractor.Tests/RecursiveExtractor.Tests.csproj' |
37 | | - - template: dotnet-test-job.yml@templates |
38 | | - parameters: |
39 | | - jobName: 'cli_dotnet_test_windows' |
40 | | - dotnetVersions: ['6.0.x','7.0.x','8.0.x'] |
41 | | - vmImage: 'win2022-image-base' |
42 | | - projectPath: 'RecursiveExtractor.Cli.Tests/RecursiveExtractor.Cli.Tests.csproj' |
43 | | - |
44 | | -- stage: SDL |
45 | | - dependsOn: [] |
46 | | - jobs: |
47 | | - - template: sdl-job.yml@templates |
48 | | - parameters: |
49 | | - preScan: |
50 | | - - template: policheck-exclusion-steps.yml@templates |
| 33 | +extends: |
| 34 | + template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines |
| 35 | + parameters: |
| 36 | + pool: |
| 37 | + name: MSSecurity-1ES-Build-Agents-Pool |
| 38 | + image: MSSecurity-1ES-Windows-2022 |
| 39 | + os: windows |
| 40 | + sdl: |
| 41 | + armory: |
| 42 | + enabled: false |
| 43 | + stages: |
| 44 | + - stage: Test |
| 45 | + dependsOn: [] |
| 46 | + jobs: |
| 47 | + - template: dotnet-test-job.yml@templates |
51 | 48 | parameters: |
52 | | - ExcludeFolderPathStart: 'RecursiveExtractor.Tests' |
53 | | - policheckExclusionFile: $(Build.SourcesDirectory)/PolicheckExclusions.xml |
54 | | - |
55 | | -- stage: Build |
56 | | - dependsOn: |
57 | | - - Test |
58 | | - jobs: |
59 | | - - template: nuget-build-job.yml@templates |
60 | | - parameters: |
61 | | - jobName: 'pack_lib' |
62 | | - buildConfiguration: ${{ variables.BuildConfiguration }} |
63 | | - dotnetVersion: ${{ variables.DotnetVersion }} |
64 | | - projectPath: 'RecursiveExtractor/RecursiveExtractor.csproj' |
65 | | - projectName: 'RecursiveExtractor' |
66 | | - customPackFlags: '/p:ContinuousIntegrationBuild=true' |
67 | | - preBuild: |
68 | | - - template: nbgv-set-version-steps.yml@templates |
69 | | - - template: nuget-build-job.yml@templates |
70 | | - parameters: |
71 | | - jobName: 'pack_cli' |
72 | | - buildConfiguration: ${{ variables.BuildConfiguration }} |
73 | | - dotnetVersion: ${{ variables.DotnetVersion }} |
74 | | - projectPath: 'RecursiveExtractor.Cli/RecursiveExtractor.Cli.csproj' |
75 | | - projectName: 'RecursiveExtractor_CLI' |
76 | | - customPackFlags: '/p:ContinuousIntegrationBuild=true' |
77 | | - preBuild: |
78 | | - - template: nbgv-set-version-steps.yml@templates |
| 49 | + jobName: 'lib_dotnet_test_windows' |
| 50 | + dotnetVersions: ['6.0.x','7.0.x','8.0.x'] |
| 51 | + projectPath: 'RecursiveExtractor.Tests/RecursiveExtractor.Tests.csproj' |
| 52 | + poolName: MSSecurity-1ES-Build-Agents-Pool |
| 53 | + poolImage: MSSecurity-1ES-Windows-2022 |
| 54 | + poolOs: windows |
| 55 | + - template: dotnet-test-job.yml@templates |
| 56 | + parameters: |
| 57 | + jobName: 'cli_dotnet_test_windows' |
| 58 | + dotnetVersions: ['6.0.x','7.0.x','8.0.x'] |
| 59 | + projectPath: 'RecursiveExtractor.Cli.Tests/RecursiveExtractor.Cli.Tests.csproj' |
| 60 | + poolName: MSSecurity-1ES-Build-Agents-Pool |
| 61 | + poolImage: MSSecurity-1ES-Windows-2022 |
| 62 | + poolOs: windows |
79 | 63 |
|
80 | | -- stage: Release |
81 | | - dependsOn: |
82 | | - - SDL |
83 | | - - Build |
84 | | - condition: succeeded() |
85 | | - jobs: |
86 | | - - job: sign_hash_release |
87 | | - displayName: Code Sign, Generate Hashes, Publish Public Releases |
88 | | - pool: |
89 | | - name: 'CSPA' |
90 | | - demands: ImageOverride -equals win2022-image-base |
91 | | - steps: |
92 | | - - task: UseDotNet@2 # For ESRP. Do not use variable. |
93 | | - inputs: |
94 | | - packageType: 'sdk' |
95 | | - version: '6.0.x' |
96 | | - - template: nbgv-set-version-steps.yml@templates |
97 | | - - task: DownloadBuildArtifacts@0 |
98 | | - displayName: Download Unsigned Archives |
99 | | - inputs: |
100 | | - buildType: 'current' |
101 | | - downloadType: 'specific' |
102 | | - itemPattern: 'Unsigned_Binaries/*.zip' |
103 | | - downloadPath: '$(Build.BinariesDirectory)' |
104 | | - - task: ExtractFiles@1 |
105 | | - displayName: Extract Artifacts for Signing |
106 | | - inputs: |
107 | | - archiveFilePatterns: '$(Build.BinariesDirectory)\Unsigned_Binaries\*.zip' |
108 | | - destinationFolder: '$(Build.BinariesDirectory)' |
109 | | - cleanDestinationFolder: false |
110 | | - overwriteExistingFiles: true |
111 | | - - task: AntiMalware@4 |
112 | | - displayName: Anti-Malware Scan |
113 | | - inputs: |
114 | | - InputType: 'Basic' |
115 | | - ScanType: 'CustomScan' |
116 | | - FileDirPath: '$(Build.BinariesDirectory)' |
117 | | - EnableServices: true |
118 | | - SupportLogOnError: true |
119 | | - TreatSignatureUpdateFailureAs: 'Warning' |
120 | | - SignatureFreshness: 'UpToDate' |
121 | | - TreatStaleSignatureAs: 'Warning' |
122 | | - - task: EsrpCodeSigning@3 |
123 | | - displayName: Code Sign Nuget Packages |
124 | | - inputs: |
125 | | - ConnectedServiceName: 'RecursiveExtractor_CodeSign' |
126 | | - FolderPath: '$(Build.BinariesDirectory)' |
127 | | - Pattern: '*.nupkg, *.snupkg' |
128 | | - signConfigType: 'inlineSignParams' |
129 | | - inlineOperation: | |
130 | | - [ |
131 | | - { |
132 | | - "KeyCode" : "CP-401405", |
133 | | - "OperationCode" : "NuGetSign", |
134 | | - "Parameters" : {}, |
135 | | - "ToolName" : "sign", |
136 | | - "ToolVersion" : "1.0" |
137 | | - }, |
138 | | - { |
139 | | - "KeyCode" : "CP-401405", |
140 | | - "OperationCode" : "NuGetVerify", |
141 | | - "Parameters" : {}, |
142 | | - "ToolName" : "sign", |
143 | | - "ToolVersion" : "1.0" |
144 | | - } |
145 | | - ] |
146 | | - SessionTimeout: '60' |
147 | | - MaxConcurrency: '50' |
148 | | - MaxRetryAttempts: '5' |
149 | | - - powershell: 'Get-ChildItem -Path ''$(Build.BinariesDirectory)'' -Recurse CodeSign* | foreach { Remove-Item -Path $_.FullName }' |
150 | | - displayName: 'Delete Code Sign Summaries' |
151 | | - - task: PowerShell@2 |
152 | | - displayName: Move NuGet Packages |
153 | | - inputs: |
154 | | - targetType: 'inline' |
155 | | - script: | |
156 | | - mv $env:BUILD_BINARIESDIRECTORY/*.nupkg $env:BUILD_STAGINGDIRECTORY/ |
157 | | - mv $env:BUILD_BINARIESDIRECTORY/*.snupkg $env:BUILD_STAGINGDIRECTORY/ |
158 | | - - task: PublishPipelineArtifact@1 |
159 | | - displayName: Pipeline Publish Signed Artifacts |
160 | | - inputs: |
161 | | - targetPath: '$(Build.StagingDirectory)' |
162 | | - artifact: 'Signed_Binaries' |
163 | | - - task: NuGetCommand@2 |
164 | | - displayName: Publish NuGet Packages |
165 | | - inputs: |
166 | | - command: 'push' |
167 | | - packagesToPush: '$(Build.StagingDirectory)/*.nupkg' |
168 | | - nuGetFeedType: 'external' |
169 | | - publishFeedCredentials: 'CST-E Nuget CI' |
170 | | - verbosityPush: 'Normal' |
| 64 | + - stage: Build |
| 65 | + dependsOn: |
| 66 | + - Test |
| 67 | + jobs: |
| 68 | + - template: nuget-build-job.yml@templates |
| 69 | + parameters: |
| 70 | + jobName: 'pack_lib' |
| 71 | + buildConfiguration: ${{ variables.BuildConfiguration }} |
| 72 | + dotnetVersion: ${{ variables.DotnetVersion }} |
| 73 | + projectPath: 'RecursiveExtractor/RecursiveExtractor.csproj' |
| 74 | + projectName: 'RecursiveExtractor' |
| 75 | + customPackFlags: '/p:ContinuousIntegrationBuild=true' |
| 76 | + artifactName: 'lib-archive' |
| 77 | + preBuild: |
| 78 | + - template: nbgv-set-version-steps.yml@templates |
| 79 | + - template: nuget-build-job.yml@templates |
| 80 | + parameters: |
| 81 | + jobName: 'pack_cli' |
| 82 | + buildConfiguration: ${{ variables.BuildConfiguration }} |
| 83 | + dotnetVersion: ${{ variables.DotnetVersion }} |
| 84 | + projectPath: 'RecursiveExtractor.Cli/RecursiveExtractor.Cli.csproj' |
| 85 | + projectName: 'RecursiveExtractor_CLI' |
| 86 | + customPackFlags: '/p:ContinuousIntegrationBuild=true' |
| 87 | + artifactName: 'cli-archive' |
| 88 | + preBuild: |
| 89 | + - template: nbgv-set-version-steps.yml@templates |
0 commit comments