Skip to content

Commit 4cb5b93

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

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.pipelines/PowerShellEditorServices-Official.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ parameters:
2424
displayName: Enable debug output
2525
type: boolean
2626
default: false
27+
- name: official
28+
displayName: Use Official OneBranch template
29+
default: false
2730

2831
variables:
2932
system.debug: ${{ parameters.debug }}
@@ -41,7 +44,7 @@ resources:
4144

4245
extends:
4346
# https://aka.ms/obpipelines/templates
44-
template: v2/OneBranch.Official.CrossPlat.yml@templates
47+
template: ${{ iif(parameters.Official, 'v2/OneBranch.Official.CrossPlat.yml@templates', 'v2/OneBranch.NonOfficial.CrossPlat.yml@templates') }}
4548
parameters:
4649
globalSdl: # https://aka.ms/obpipelines/sdl
4750
asyncSdl:
@@ -103,6 +106,7 @@ extends:
103106
continueOnError: true
104107
- task: onebranch.pipeline.signing@1
105108
displayName: Sign 1st-party files
109+
condition: and(succeeded(), eq(parameters.official, true))
106110
inputs:
107111
command: sign
108112
signing_profile: external_distribution
@@ -115,6 +119,7 @@ extends:
115119
**/Microsoft.PowerShell.EditorServices*.dll;
116120
- task: onebranch.pipeline.signing@1
117121
displayName: Sign 3rd-party files
122+
condition: and(succeeded(), eq(parameters.official, true))
118123
inputs:
119124
command: sign
120125
signing_profile: 135020002
@@ -126,15 +131,15 @@ extends:
126131
**/OmniSharp.Extensions*.dll;
127132
**/System.Reactive.dll;
128133
- task: ArchiveFiles@2
129-
displayName: Zip signed artifacts
134+
displayName: Zip artifacts
130135
inputs:
131136
rootFolderOrFile: $(Build.SourcesDirectory)/module
132137
includeRootFolder: false
133138
archiveType: zip
134139
archiveFile: out/PowerShellEditorServices.zip
135140
- stage: release
136141
dependsOn: build
137-
condition: eq(variables['Build.Reason'], 'Manual')
142+
condition: and(succeeded(), eq(parameters.official, true), eq(variables.Build.Reason, 'Manual'))
138143
variables:
139144
ob_release_environment: Production
140145
version: $[ stageDependencies.build.main.outputs['package.version'] ]

0 commit comments

Comments
 (0)