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)
5
2
6
3
variables :
7
4
# Don't download unneeded packages
@@ -12,158 +9,68 @@ variables:
12
9
value : ' true'
13
10
14
11
trigger :
15
- batch : true
16
12
branches :
17
13
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
36
15
37
16
resources :
38
17
repositories :
39
18
- repository : ComplianceRepo
40
19
type : github
41
- endpoint : ComplianceGHRepo
20
+ endpoint : GitHub
42
21
name : PowerShell/compliance
43
22
44
23
stages :
45
24
- stage : Build
46
- displayName : Build
25
+ displayName : Build the release
47
26
jobs :
48
- - job : ' ReleaseBuild'
49
- displayName : Release Build
27
+ - job : Build
50
28
pool :
51
- vmImage : ' windows-latest'
29
+ name : 1ES
30
+ demands : ImageOverride -equals PSMMS2019-Secure
52
31
steps :
53
32
- 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
60
33
61
- - job : ' SignBuild'
62
- displayName : Signing Build
63
- dependsOn : ' ReleaseBuild'
34
+ - stage : Sign
35
+ displayName : Sign the release
36
+ jobs :
37
+ - job : Sign
64
38
pool :
65
- name : ' Package ES Standard Build '
66
- demands : DotNetFramework
39
+ name : 1ES
40
+ demands : ImageOverride -equals PSMMS2019-Secure
67
41
variables :
68
42
- group : ESRP
69
43
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
129
45
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
138
48
jobs :
139
- - job : Compliance_Job
49
+ - deployment : Publish
50
+ environment : GraphicalTools-GitHub
140
51
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