Skip to content

Commit 5e05175

Browse files
committed
Make MSIX publish stage dependent on SetReleaseTagandContainerName stage
1 parent 06ddfe3 commit 5e05175

File tree

4 files changed

+25
-16
lines changed

4 files changed

+25
-16
lines changed

.pipelines/PowerShell-Release-Official.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,12 @@ extends:
365365
This is typically done by the community 1-2 days after the release.
366366
367367
- stage: PublishMsix
368-
dependsOn: PushGitTagAndMakeDraftPublic
368+
dependsOn:
369+
- setReleaseTagAndChangelog
370+
- PushGitTagAndMakeDraftPublic
369371
displayName: Publish MSIX to store
370372
variables:
371-
ob_release_environment: Production
373+
ob_release_environment: ${{ variables.releaseEnvironment }}
372374
jobs:
373375
- template: /.pipelines/templates/release-MSIX-Publish.yml@self
374376
parameters:

.pipelines/templates/package-create-msix.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ jobs:
9797
displayName: Create MsixBundle
9898
retryCountOnTaskFailure: 1
9999
100-
# - task: onebranch.pipeline.signing@1
101-
# displayName: Sign MsixBundle
102-
# inputs:
103-
# command: 'sign'
104-
# signing_profile: $(MSIXProfile)
105-
# files_to_sign: '**/*.msixbundle'
106-
# search_root: '$(BundleDir)'
100+
- task: onebranch.pipeline.signing@1
101+
displayName: Sign MsixBundle
102+
inputs:
103+
command: 'sign'
104+
signing_profile: $(MSIXProfile)
105+
files_to_sign: '**/*.msixbundle'
106+
search_root: '$(BundleDir)'
107107

108108
- pwsh: |
109109
$signedBundle = Get-ChildItem -Path $(BundleDir) -Filter "*.msixbundle" -File

.pipelines/templates/release-MSIX-Publish.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
- name: PREVIEW
2323
value: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['ChannelSelection.IsPreview'] ]
2424
- template: ./variable/release-shared.yml@self
25+
parameters:
26+
RELEASETAG: $[ stageDependencies.setReleaseTagAndChangelog.setTagAndChangelog.outputs['OutputReleaseTag.releaseTag'] ]
2527
steps:
2628
- task: PowerShell@2
2729
inputs:
@@ -41,14 +43,14 @@ jobs:
4143
}
4244
$middleURL = ''
4345
$tagString = "$(ReleaseTag)"
44-
if ($tagString -match '-') {
46+
if ($tagString -match '-preview') {
4547
$middleURL = "preview"
4648
}
4749
elseif ($tagString -match '(\d+\.\d+)') {
4850
$middleURL = $matches[1]
4951
}
5052
51-
$endURL = $tagString -replace '[v\.]',''
53+
$endURL = $tagString -replace '^v|\.', ''
5254
$message = "Changelog: https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/$middleURL.md#$endURL"
5355
Write-Verbose -Verbose "Release Notes for the Store:"
5456
Write-Verbose -Verbose "$message"
@@ -88,7 +90,7 @@ jobs:
8890
displayName: 'Publish LTS StoreBroker Package'
8991
condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['LTS'], 'true'))
9092
inputs:
91-
serviceEndpoint: 'StoreAppPublish-Stable'
93+
serviceEndpoint: 'StoreAppPublish-Private'
9294
appId: '$(AppID-LTS)'
9395
inputMethod: JsonAndZip
9496
jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json'
@@ -101,7 +103,7 @@ jobs:
101103
displayName: 'Publish Stable StoreBroker Package'
102104
condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['STABLE'], 'true'))
103105
inputs:
104-
serviceEndpoint: 'StoreAppPublish-Stable'
106+
serviceEndpoint: 'StoreAppPublish-Private'
105107
appId: '$(AppID-Stable)'
106108
inputMethod: JsonAndZip
107109
jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json'
@@ -114,11 +116,16 @@ jobs:
114116
displayName: 'Publish Preview StoreBroker Package'
115117
condition: and(ne('${{ parameters.skipMSIXPublish }}', 'true'), eq(variables['PREVIEW'], 'true'))
116118
inputs:
117-
serviceEndpoint: 'StoreAppPublish-Preview'
119+
serviceEndpoint: 'StoreAppPublish-Private'
118120
appId: '$(AppID-Preview)'
119121
inputMethod: JsonAndZip
120122
jsonPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json'
121123
zipPath: '$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.zip'
122124
numberOfPackagesToKeep: 2
123125
jsonZipUpdateMetadata: true
124126
targetPublishMode: 'Immediate'
127+
128+
- pwsh: |
129+
Get-Content -Path "$(System.DefaultWorkingDirectory)/SBLog.txt" -ErrorAction SilentlyContinue
130+
displayName: Upload Store Failure Log
131+
condition: failed()

.pipelines/templates/release-githubNuget.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ jobs:
121121
$middleURL = ''
122122
$tagString = "$(ReleaseTag)"
123123
Write-Verbose -Verbose "Use the following command to push the tag:"
124-
if ($tagString -match '-') {
124+
if ($tagString -match '-preview') {
125125
$middleURL = "preview"
126126
}
127127
elseif ($tagString -match '(\d+\.\d+)') {
128128
$middleURL = $matches[1]
129129
}
130-
$endURL = $tagString -replace '[v\.]',''
130+
$endURL = $tagString -replace '^v|\.', ''
131131
$message = "https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/$middleURL.md#$endURL"
132132
Write-Verbose -Verbose "git tag -a $(ReleaseTag) $env:BUILD_SOURCEVERSION -m $message"
133133
displayName: Git Push Tag Command

0 commit comments

Comments
 (0)