1- # Add steps that analyze code, save build artifacts, deploy, and more:
2- # https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/dotnet-core
3-
41trigger : none
52
63variables :
@@ -22,30 +19,38 @@ variables:
2219 # Build platform
2320 buildPlatform : " x64"
2421
22+ # Docker image which is used to build the project
23+ WindowsContainerImage : ' onebranch.azurecr.io/windows/ltsc2019/vse2022:latest'
24+
2525resources :
2626 repositories :
27- - repository : 1ESPipelineTemplates
28- type : git
29- name : 1ESPipelineTemplates/1ESPipelineTemplates
30- ref : refs/tags/release
27+ - repository : templates
28+ type : git
29+ name : OneBranch.Pipelines/GovernedTemplates
30+ ref : refs/heads/main
31+
3132extends :
32- template : v1/1ES .Official.PipelineTemplate. yml@1ESPipelineTemplates
33+ template : v2/Microsoft .Official.yml@templates
3334 parameters :
34- pool :
35- name : Azure-Pipelines-1ESPT-ExDShared
36- image : windows-2022
37- os : windows
38- customBuildTags :
39- - ES365AIMigrationTooling
35+ platform :
36+ name : ' windows_undocked'
37+
38+ git :
39+ fetchTags : false
4040
4141 stages :
4242 - stage : __default
4343
4444 jobs :
4545 - job : GetVersion
46+ pool :
47+ type : windows
48+
4649 variables :
4750 runCodesignValidationInjection : ${{ false }}
4851 skipComponentGovernanceDetection : ${{ true }}
52+ ob_outputDirectory : $(Build.ArtifactStagingDirectory)/wingetcreate
53+
4954 steps :
5055 - task : PowerShell@2
5156 name : GetVersionStep
@@ -60,6 +65,9 @@ extends:
6065 - job : Build
6166 displayName : Build
6267 dependsOn : GetVersion
68+ pool :
69+ type : windows
70+
6371 variables :
6472 majorMinorVersion : $[dependencies.GetVersion.outputs['GetVersionStep.majorMinorVersion']]
6573 buildVersion : $[counter(variables['majorMinorVersion'], 1)]
@@ -68,11 +76,10 @@ extends:
6876 appxBundlePath : ' $(appxPackageDir)\$(appxBundleFile)'
6977 exeDirFrameworkDependent : ' $(appxPackageDir)\dependent'
7078 exePathFrameworkDependent : ' $(exeDirFrameworkDependent)\WingetCreateCLI\wingetcreate.exe'
79+ ob_outputDirectory : $(Build.ArtifactStagingDirectory)
80+ ob_symbolsPublishing_enabled : true
7181
7282 steps :
73- - checkout : self
74- lfs : " true"
75-
7683 - task : PowerShell@2
7784 name : OutputVersionStep
7885 displayName : Set output variables for UpdateManifest job
@@ -112,12 +119,12 @@ extends:
112119 source : ' minkernel\published\internal\telemetry\TelemetryEventSource.cs'
113120 destination : ' $(workingDirectory)\WingetCreateCLI\Telemetry\'
114121
115- # Copies binary dependencies from VCLibs package to be included in standalone exe
122+ # Copies binary dependencies from VCLibs package to be included in standalone exe
116123 - task : PowerShell@2
117124 displayName : Download VCLibs package
118125 inputs :
119126 targetType : ' inline'
120- script : |
127+ script : |
121128 iwr https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx
122129
123130 - task : ExtractFiles@1
@@ -126,7 +133,11 @@ extends:
126133 archiveFilePatterns : ' Microsoft.VCLibs.x64.14.00.Desktop.appx'
127134 destinationFolder : ' $(workingDirectory)\WingetCreateCLI'
128135 cleanDestinationFolder : false
129- overwriteExistingFiles : false
136+ overwriteExistingFiles : false
137+
138+ - powershell : Move-Item NuGet.Internal.config NuGet.config -Force
139+ displayName : Configure internal feed
140+ workingDirectory : $(Build.SourcesDirectory)
130141
131142 - task : DotNetCoreCLI@2
132143 displayName : Restore
@@ -156,50 +167,15 @@ extends:
156167 /p:UapAppxPackageBuildMode=SideloadOnly
157168 /p:AppxPackageSigningEnabled=false'
158169
159- - task : UseDotNet@2
160- displayName : ' Install .NET Core SDK required for ESRPCodeSigning'
161- inputs :
162- packageType : sdk
163- version : ' 6.x'
164-
165- - task : EsrpCodeSigning@5
166- displayName : ' ESRP CodeSigning'
170+ - task : onebranch.pipeline.signing@1
171+ displayName : ' CodeSigning'
167172 inputs :
168- ConnectedServiceName : ' AppInstallerESRPCodeSigning'
169- AppRegistrationClientId : ' 32216f16-efc9-4013-9fae-c6a2c54a3fc0'
170- AppRegistrationTenantId : ' 72f988bf-86f1-41af-91ab-2d7cd011db47'
171- AuthAKVName : ' PeetDevOpsKeyVault'
172- AuthCertName : ' ESRPAuth'
173- AuthSignCertName : ' ESRPRequestSigning'
174- FolderPath : $(appxPackageDir)
175- Pattern : |
176- $(appxBundleFile)
177- **/WingetCreateCLI.exe
178- UseMinimatch : true
179- signConfigType : inlineSignParams
180- inlineOperation : |
181- [
182- {
183- "KeyCode" : "CP-230012",
184- "OperationCode" : "SigntoolSign",
185- "Parameters" : {
186- "OpusName" : "Microsoft",
187- "OpusInfo" : "http://www.microsoft.com",
188- "FileDigest" : "/fd \"SHA256\"",
189- "PageHash" : "/NPH",
190- "TimeStamp" : "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
191- },
192- "ToolName" : "sign",
193- "ToolVersion" : "1.0"
194- },
195- {
196- "KeyCode" : "CP-230012",
197- "OperationCode" : "SigntoolVerify",
198- "Parameters" : {},
199- "ToolName" : "sign",
200- "ToolVersion" : "1.0"
201- }
202- ]
173+ command : ' sign'
174+ cp_code : 400 # CP-230012 - Microsoft Corporation (SHA2 Root - Standard Root)
175+ search_root : $(appxPackageDir)
176+ files_to_sign : |
177+ $(appxBundlePath);
178+ **\WingetCreateCLI.exe
203179
204180 - task : PowerShell@2
205181 displayName : " Create hash files"
@@ -213,20 +189,14 @@ extends:
213189 - task : CopyFiles@2
214190 displayName : Copy files to be published to staging directory
215191 inputs :
216- targetFolder : $(Build.ArtifactStagingDirectory)/wingetcreate
192+ targetFolder : $(ob_outputDirectory)
217193 flattenFolders : true
218194 contents : |
219195 $(exePathFrameworkDependent)
220196 $(exePathFrameworkDependent).txt
221197 $(appxBundlePath)
222198 $(appxBundlePath).txt
223199
224- - task : 1ES.PublishPipelineArtifact@1
225- inputs :
226- targetPath : $(Build.ArtifactStagingDirectory)/wingetcreate
227- artifactName : wingetcreate
228- displayName : Publish appx, exe, and hash files
229-
230200 - task : GitHubRelease@1
231201 displayName : Create GitHub release
232202 inputs :
@@ -236,13 +206,16 @@ extends:
236206 tag : v$(version)
237207 isPreRelease : true
238208 isDraft : true # After running this step, visit the new draft release, edit, and publish.
239- assets : $(Build.ArtifactStagingDirectory)/wingetcreate/*
209+ assets : $(ob_outputDirectory)
240210
241211 - job : Wait
242212 displayName : Wait for vanity URL to be manually updated
243213 dependsOn : Build
244- pool : server
214+ pool :
215+ type : agentless
216+
245217 timeoutInMinutes : 1440 # job times out in 1 day
218+
246219 steps :
247220 - task : ManualValidation@0
248221 timeoutInMinutes : 1440 # task times out in 1 day
@@ -253,6 +226,9 @@ extends:
253226 dependsOn :
254227 - Build
255228 - Wait
229+ pool :
230+ type : windows
231+
256232 variables :
257233 runCodesignValidationInjection : ${{ false }}
258234 skipComponentGovernanceDetection : ${{ true }}
@@ -261,9 +237,10 @@ extends:
261237 vcLibsBundleFile : " Microsoft.VCLibs.x64.14.00.Desktop.appx"
262238 msixPackageUrl : " https://github.com/microsoft/winget-create/releases/download/v$(manifestVersion)/$(appxBundleFile)"
263239 portablePackageUrl : " https://github.com/microsoft/winget-create/releases/download/v$(manifestVersion)/wingetcreate.exe"
240+ ob_outputDirectory : $(Build.ArtifactStagingDirectory)
241+ ob_git_checkout : false
242+
264243 steps :
265- - checkout : none
266-
267244 - task : PowerShell@2
268245 displayName : Update package manifest in the OWC
269246 inputs :
0 commit comments