1- # NOTE:
2- # We stop signing GraphicalTools now since we aren't doing anymore work on it until MAUI
3-
4- name : PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
1+ name : Release-$(Build.SourceBranchName)-$(Date:yyyyMMdd)$(Rev:.rr)
52
63variables :
74 # Don't download unneeded packages
@@ -12,158 +9,68 @@ variables:
129 value : ' true'
1310
1411trigger :
15- batch : true
1612 branches :
1713 include :
18- - master
19- paths :
20- exclude :
21- - /.dependabot/*
22- - /.poshchan/*
23- - /.github/**/*
24- - /.vscode/**/*
25- - /.vsts-ci/misc-analysis.yml
26- - /tools/**/*
27- - .editorconfig
28- - .gitattributes
29- - .gitignore
30- - /docs/**/*
31- - /CHANGELOG.md
32- - /CONTRIBUTING.md
33- - /README.md
34- - /LICENSE.txt
35- - /CODE_OF_CONDUCT.md
14+ - release
3615
3716resources :
3817 repositories :
3918 - repository : ComplianceRepo
4019 type : github
41- endpoint : ComplianceGHRepo
20+ endpoint : GitHub
4221 name : PowerShell/compliance
4322
4423stages :
4524- stage : Build
46- displayName : Build
25+ displayName : Build the release
4726 jobs :
48- - job : ' ReleaseBuild'
49- displayName : Release Build
27+ - job : Build
5028 pool :
51- vmImage : ' windows-latest'
29+ name : 1ES
30+ demands : ImageOverride -equals PSMMS2019-Secure
5231 steps :
5332 - template : templates/ci-general.yml
54- - pwsh : |
55- Get-ChildItem -Recurse '$(Build.SourcesDirectory)'
56- displayName: Capture downloaded artifacts
57- - publish : ' $(Build.SourcesDirectory)\src\Microsoft.PowerShell.ConsoleGuiTools\obj\project.assets.json'
58- artifact : ConsoleGuiToolsAssetsJson
59- displayName : Publish ConsoleGuiTools project.assets.json
6033
61- - job : ' SignBuild'
62- displayName : Signing Build
63- dependsOn : ' ReleaseBuild'
34+ - stage : Sign
35+ displayName : Sign the release
36+ jobs :
37+ - job : Sign
6438 pool :
65- name : ' Package ES Standard Build '
66- demands : DotNetFramework
39+ name : 1ES
40+ demands : ImageOverride -equals PSMMS2019-Secure
6741 variables :
6842 - group : ESRP
6943 steps :
70- - powershell : |
71- Get-ChildItem -Path env:
72- displayName: Capture environment
73- condition: succeededOrFailed()
74-
75- - task : DownloadBuildArtifacts@0
76- displayName : ' Download Build Artifacts'
77- inputs :
78- downloadType : specific
79-
80- - pwsh : |
81- Expand-Archive -Path "$env:BUILD_ARTIFACTSTAGINGDIRECTORY\GraphicalTools\Microsoft.PowerShell.ConsoleGuiTools-Windows_NT.zip" -DestinationPath "$env:BUILD_ARTIFACTSTAGINGDIRECTORY\Microsoft.PowerShell.ConsoleGuiTools"
82- displayName: 'Extract build zip'
83-
84- - template : EsrpSign.yml@ComplianceRepo
85- parameters :
86- # the folder which contains the binaries to sign
87- buildOutputPath : $(Build.ArtifactStagingDirectory)\Microsoft.PowerShell.ConsoleGuiTools
88- # the location to put the signed output
89- signOutputPath : $(Build.ArtifactStagingDirectory)\Microsoft.PowerShell.ConsoleGuiTools-Signed
90- # the certificate ID to use
91- certificateId : " CP-230012"
92- # The file pattern to use
93- # If not using minimatch: comma separated, with * supported
94- # If using minimatch: newline separated, with !, **, and * supported.
95- # See link in the useMinimatch comments.
96- pattern : ' Microsoft.PowerShell.*.dll,Microsoft.PowerShell.*.psd1,Microsoft.PowerShell.*.psm1'
97- # decides if the task should use minimatch for the pattern matching.
98- # https://github.com/isaacs/minimatch#features
99- useMinimatch : false
100-
101- - pwsh : |
102- $signed="$env:BUILD_ARTIFACTSTAGINGDIRECTORY\Microsoft.PowerShell.ConsoleGuiTools-Signed\*"
103- $notSigned="$env:BUILD_ARTIFACTSTAGINGDIRECTORY\Microsoft.PowerShell.ConsoleGuiTools"
104- Copy-Item $signed $notSigned -Recurse -Force -Verbose
105- displayName: 'Copy signed files to unsigned folder'
106-
107- - template : EsrpSign.yml@ComplianceRepo
108- parameters :
109- # the folder which contains the binaries to sign
110- buildOutputPath : $(Build.ArtifactStagingDirectory)\Microsoft.PowerShell.ConsoleGuiTools
111- # the location to put the signed output
112- signOutputPath : $(Build.ArtifactStagingDirectory)\Microsoft.PowerShell.ConsoleGuiTools-Signed
113- # the certificate ID to use
114- certificateId : " CP-231522"
115- # The file pattern to use
116- # If not using minimatch: comma separated, with * supported
117- # If using minimatch: newline separated, with !, **, and * supported.
118- # See link in the useMinimatch comments.
119- pattern : ' NStack.dll,Terminal.Gui.dll'
120- # decides if the task should use minimatch for the pattern matching.
121- # https://github.com/isaacs/minimatch#features
122- useMinimatch : false
123-
124- - pwsh : |
125- $signed="$(Build.ArtifactStagingDirectory)\Microsoft.PowerShell.ConsoleGuiTools-Signed\*"
126- $notSigned="$(Build.ArtifactStagingDirectory)\Microsoft.PowerShell.ConsoleGuiTools"
127- Copy-Item $signed $notSigned -Recurse -Force -Verbose
128- displayName: 'Copy signed files to unsigned folder'
44+ - template : templates/release-general.yml
12945
130- - publish : $(Build.ArtifactStagingDirectory)\Microsoft.PowerShell.ConsoleGuiTools
131- artifact : Microsoft.PowerShell.ConsoleGuiTools-Signed
132- displayName : ' Upload Artifacts'
133- condition : succeededOrFailed()
134-
135- - stage : compliance
136- displayName : Compliance
137- dependsOn : Build
46+ - stage : PublishGitHub
47+ displayName : Publish the draft release
13848 jobs :
139- - job : Compliance_Job
49+ - deployment : Publish
50+ environment : GraphicalTools-GitHub
14051 pool :
141- name : Package ES Standard Build
142- steps :
143- - checkout : self
144- - checkout : ComplianceRepo
145- - download : current
146- artifact : Microsoft.PowerShell.ConsoleGuiTools-Signed
147- - download : current
148- artifact : ConsoleGuiToolsAssetsJson
149-
150- - pwsh : |
151- Get-ChildItem -Recurse '$(Pipeline.Workspace)'
152- displayName: Capture downloaded artifacts
153-
154- - template : assembly-module-compliance.yml@ComplianceRepo
155- parameters :
156- # binskim
157- AnalyzeTarget : ' $(Pipeline.Workspace)\Microsoft.PowerShell.ConsoleGuiTools-Signed\*.dll'
158- AnalyzeSymPath : ' SRV*'
159- # component-governance
160- sourceScanPath : ' $(Pipeline.Workspace)\ConsoleGuiToolsAssetsJson'
161- # credscan
162- suppressionsFile : ' '
163- # TermCheck
164- optionsRulesDBPath : ' '
165- optionsFTPath : ' '
166- # tsa-upload
167- codeBaseName : ' PSGraphicalTools_20201123'
168- # selections
169- APIScan : false # set to false when not using Windows APIs.
52+ name : 1ES
53+ demands : ImageOverride -equals PSMMSUbuntu20.04-Secure
54+ variables :
55+ - group : Publish
56+ strategy :
57+ runOnce :
58+ deploy :
59+ steps :
60+ - template : templates/publish-github.yml
61+
62+ - stage : PublishMarkets
63+ displayName : Publish to marketplace and gallery
64+ jobs :
65+ - deployment : Publish
66+ environment : GraphicalTools-Gallery
67+ pool :
68+ name : 1ES
69+ demands : ImageOverride -equals PSMMSUbuntu20.04-Secure
70+ variables :
71+ - group : Publish
72+ strategy :
73+ runOnce :
74+ deploy :
75+ steps :
76+ - template : templates/publish-markets.yml
0 commit comments