1+ parameters :
2+ - name : OfficialBuild
3+ type : boolean
4+ default : false
5+
16jobs :
27- job : CreateMSIXBundle
38 displayName : Create .msixbundle file
4954 **/*.msix
5055 targetPath : ' $(Build.ArtifactStagingDirectory)/downloads'
5156 displayName : Download windows x86 packages
52-
57+
5358 # Finds the makeappx tool on the machine with image: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest'
5459 - pwsh : |
5560 $cmd = Get-Command makeappx.exe -ErrorAction Ignore
@@ -99,12 +104,13 @@ jobs:
99104
100105 - task : onebranch.pipeline.signing@1
101106 displayName : Sign MsixBundle
107+ condition : eq('${{ parameters.OfficialBuild }}', 'true')
102108 inputs :
103109 command : ' sign'
104110 signing_profile : $(MSIXProfile)
105111 files_to_sign : ' **/*.msixbundle'
106112 search_root : ' $(BundleDir)'
107-
113+
108114 - pwsh : |
109115 $signedBundle = Get-ChildItem -Path $(BundleDir) -Filter "*.msixbundle" -File
110116 Write-Verbose -Verbose "Signed bundle: $signedBundle"
@@ -126,12 +132,12 @@ jobs:
126132 Get-ChildItem -Path $(System.DefaultWorkingDirectory) -Recurse | Select-Object -ExpandProperty FullName
127133 Test-Path -Path '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP-Private.xml' | Write-Verbose -Verbose
128134 displayName: Output Pipeline.Workspace and System.DefaultWorkingDirectory
129-
135+
130136 - template : channelSelection.yml@self
131137
132138 - pwsh : |
133139 $IsLTS = '$(ChannelSelection.IsLTS)' -eq 'true'
134- $IsStable = '$(ChannelSelection.IsStable)' -eq 'true'
140+ $IsStable = '$(ChannelSelection.IsStable)' -eq 'true'
135141 $IsPreview = '$(ChannelSelection.IsPreview)' -eq 'true'
136142
137143 Write-Verbose -Verbose "Channel Selection - LTS: $IsLTS, Stable: $IsStable, Preview: $IsPreview"
@@ -161,11 +167,11 @@ jobs:
161167 $currentChannel = if ($IsLTS) { 'LTS' }
162168 elseif ($IsStable) { 'Stable' }
163169 elseif ($IsPreview) { 'Preview' }
164- else {
170+ else {
165171 Write-Error "No valid channel detected"
166172 exit 1
167173 }
168-
174+
169175 $config = $channelConfigs[$currentChannel]
170176 Write-Verbose -Verbose "Selected channel: $currentChannel"
171177 Write-Verbose -Verbose "App Store Name: $($config.AppStoreName)"
@@ -181,7 +187,7 @@ jobs:
181187 # Create namespace manager for XML with default namespace
182188 $nsManager = New-Object System.Xml.XmlNamespaceManager($pdpXml.NameTable)
183189 $nsManager.AddNamespace("pd", "http://schemas.microsoft.com/appx/2012/ProductDescription")
184-
190+
185191 $appStoreNameElement = $pdpXml.SelectSingleNode("//pd:AppStoreName", $nsManager)
186192 if ($appStoreNameElement) {
187193 $appStoreNameElement.SetAttribute("_locID", $config.AppStoreName)
@@ -220,12 +226,30 @@ jobs:
220226 Write-Host "##vso[task.setvariable variable=SBConfigPath]$($sbConfigPath)"
221227
222228 # These variables are used in the next tasks to determine which ServiceEndpoint to use
223- Write-Host "##vso[task.setvariable variable=LTS]$($IsLTS.ToString().ToLower())"
224- Write-Host "##vso[task.setvariable variable=STABLE]$($IsStable.ToString().ToLower())"
225- Write-Host "##vso[task.setvariable variable=PREVIEW]$($IsPreview.ToString().ToLower())"
229+ $ltsValue = $IsLTS.ToString().ToLower()
230+ $stableValue = $IsStable.ToString().ToLower()
231+ $previewValue = $IsPreview.ToString().ToLower()
232+
233+ Write-Verbose -Verbose "About to set variables:"
234+ Write-Verbose -Verbose " LTS=$ltsValue"
235+ Write-Verbose -Verbose " STABLE=$stableValue"
236+ Write-Verbose -Verbose " PREVIEW=$previewValue"
237+
238+ Write-Host "##vso[task.setvariable variable=LTS]$ltsValue"
239+ Write-Host "##vso[task.setvariable variable=STABLE]$stableValue"
240+ Write-Host "##vso[task.setvariable variable=PREVIEW]$previewValue"
241+
242+ Write-Verbose -Verbose "Variables set successfully"
226243 name: UpdateConfigs
227244 displayName: Update PDPs and SBConfig.json
228245
246+ - pwsh : |
247+ Write-Verbose -Verbose "Checking variables after UpdateConfigs:"
248+ Write-Verbose -Verbose "LTS=$(LTS)"
249+ Write-Verbose -Verbose "STABLE=$(STABLE)"
250+ Write-Verbose -Verbose "PREVIEW=$(PREVIEW)"
251+ displayName: Debug - Check Variables
252+
229253 - task : MS-RDX-MRO.windows-store-publish.package-task.store-package@3
230254 displayName : ' Create StoreBroker Package (Preview)'
231255 condition : eq('$(PREVIEW)', 'true')
@@ -260,14 +284,14 @@ jobs:
260284 $submissionPackageDir = "$(System.DefaultWorkingDirectory)/SBOutDir"
261285 $jsonFile = "$submissionPackageDir/PowerShellStorePackage.json"
262286 $zipFile = "$submissionPackageDir/PowerShellStorePackage.zip"
263-
287+
264288 if ((Test-Path $jsonFile) -and (Test-Path $zipFile)) {
265289 Write-Verbose -Verbose "Uploading StoreBroker Package files:"
266290 Write-Verbose -Verbose "JSON File: $jsonFile"
267291 Write-Verbose -Verbose "ZIP File: $zipFile"
268292
269293 Copy-Item -Path $submissionPackageDir -Destination "$(ob_outputDirectory)" -Verbose -Recurse
270- }
294+ }
271295
272296 else {
273297 Write-Error "Required files not found in $submissionPackageDir"
0 commit comments