Skip to content

Commit bcb51b4

Browse files
committed
Conditionally use Official OneBranch template
With NonOfficial available for testing.
1 parent 90e6a83 commit bcb51b4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.pipelines/PowerShellEditorServices-Official.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,18 @@ parameters:
2424
displayName: Enable debug output
2525
type: boolean
2626
default: false
27+
- name: OfficialBuild
28+
displayName: Use Official OneBranch template
29+
type: boolean
30+
default: false
2731

2832
variables:
2933
system.debug: ${{ parameters.debug }}
3034
BuildConfiguration: Release
3135
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2022/vse2022:latest
3236
DOTNET_NOLOGO: true
3337
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
38+
OneBranchTemplate: ${{ iif(parameters.OfficialBuild, 'v2/OneBranch.Official.CrossPlat.yml@templates', 'v2/OneBranch.NonOfficial.CrossPlat.yml@templates') }}
3439

3540
resources:
3641
repositories:
@@ -41,7 +46,7 @@ resources:
4146

4247
extends:
4348
# https://aka.ms/obpipelines/templates
44-
template: v2/OneBranch.Official.CrossPlat.yml@templates
49+
template: ${{ variables.OneBranchTemplate }}
4550
parameters:
4651
globalSdl: # https://aka.ms/obpipelines/sdl
4752
asyncSdl:
@@ -134,9 +139,8 @@ extends:
134139
archiveFile: out/PowerShellEditorServices.zip
135140
- stage: release
136141
dependsOn: build
137-
condition: eq(variables['Build.Reason'], 'Manual')
138142
variables:
139-
ob_release_environment: Production
143+
ob_release_environment: ${{ iif(parameters.OfficialBuild, 'Production', 'Test') }}
140144
version: $[ stageDependencies.build.main.outputs['package.version'] ]
141145
prerelease: $[ stageDependencies.build.main.outputs['package.prerelease'] ]
142146
jobs:

0 commit comments

Comments
 (0)