@@ -19,17 +19,6 @@ schedules:
1919        - main 
2020    always : true 
2121
22- parameters :
23-   - name : debug 
24-     displayName : Enable debug output 
25-     type : boolean 
26-     default : false 
27- 
28- variables :
29-   system.debug : ${{ parameters.debug }} 
30-   BuildConfiguration : Release 
31-   WindowsContainerImage : onebranch.azurecr.io/windows/ltsc2022/vse2022:latest 
32- 
3322resources :
3423  repositories :
3524    - repository : templates 
@@ -45,9 +34,25 @@ resources:
4534        stages :
4635          - release 
4736
37+ parameters :
38+   - name : debug 
39+     displayName : Enable debug output 
40+     type : boolean 
41+     default : false 
42+   - name : OfficialBuild 
43+     displayName : Use Official OneBranch template 
44+     type : boolean 
45+     default : false 
46+ 
47+ variables :
48+   system.debug : ${{ parameters.debug }} 
49+   BuildConfiguration : Release 
50+   WindowsContainerImage : onebranch.azurecr.io/windows/ltsc2022/vse2022:latest 
51+   OneBranchTemplate : ${{ iif(parameters.OfficialBuild, 'v2/OneBranch.Official.CrossPlat.yml@templates', 'v2/OneBranch.NonOfficial.CrossPlat.yml@templates') }} 
52+ 
4853extends :
4954  #  https://aka.ms/obpipelines/templates
50-   template : v2/OneBranch.Official.CrossPlat.yml@templates 
55+   template : ${{ variables.OneBranchTemplate }} 
5156  parameters :
5257    globalSdl : #  https://aka.ms/obpipelines/sdl
5358      asyncSdl :
@@ -90,14 +95,15 @@ extends:
9095                inputs :
9196                  version : 20.x 
9297              - task : DownloadPipelineArtifact@2 
93-                 displayName : Download PowerShellEditorServices 
98+                 displayName : Download Official  PowerShellEditorServices 
9499                inputs :
95100                  source : specific 
96-                   project : PowerShellCore 
97-                   definition : 2905 
101+                   project : One 
102+                   definition : 136077443 
98103                  specificBuildWithTriggering : true 
99104                  allowPartiallySucceededBuilds : true 
100105                  buildVersionToDownload : latestFromBranch 
106+                   tags : onebranch_build_type_official 
101107                  branchName : refs/heads/main 
102108                  artifact : drop_build_main 
103109              - task : ExtractFiles@1 
@@ -135,9 +141,9 @@ extends:
135141                  files_to_sign : " *.signature.p7s" 
136142      - stage : release 
137143        dependsOn : build 
138-         condition : eq(variables['Build.Reason'], 'Manual' ) 
144+         condition : and(succeeded(), ${{  eq(parameters.OfficialBuild, true) }} )
139145        variables :
140-           ob_release_environment : Production 
146+           ob_release_environment : ${{ iif(parameters.OfficialBuild, ' Production', 'Test') }} 
141147          version : $[ stageDependencies.build.main.outputs['package.version'] ] 
142148          vsixVersion : $[ stageDependencies.build.main.outputs['package.vsixVersion'] ] 
143149          prerelease : $[ stageDependencies.build.main.outputs['package.prerelease'] ] 
@@ -154,7 +160,7 @@ extends:
154160              - task : GitHubRelease@1 
155161                displayName : Create GitHub release 
156162                inputs :
157-                   gitHubConnection : GitHub 
163+                   gitHubConnection : github.com_andyleejordan 
158164                  repositoryName : PowerShell/vscode-powershell 
159165                  target : main 
160166                  assets : | 
@@ -168,19 +174,7 @@ extends:
168174                  addChangeLog : false 
169175                  releaseNotesSource : inline 
170176                  releaseNotesInline : " <!-- TODO: Generate release notes on GitHub! -->" 
171-           - job : validation 
172-             displayName : Manual validation 
173-             pool :
174-               type : server 
175-             timeoutInMinutes : 1440 
176-             steps :
177-               - task : ManualValidation@0 
178-                 displayName : Wait 24 hours for validation 
179-                 inputs :
180-                   notifyUsers : $(Build.RequestedForEmail) 
181-                   instructions : Please validate the release and then publish it! 
182177          - job : vscode 
183-             dependsOn : validation 
184178            displayName : Publish to VS Code Marketplace 
185179            pool :
186180              type : release 
@@ -190,16 +184,16 @@ extends:
190184                  artifactName : drop_build_main 
191185              workflow : vsce 
192186              vsce :
193-                 serviceConnection : vscode-marketplace 
187+                 serviceConnection : powershell- vscode-marketplace
194188                vsixPath : " $(Pipeline.Workspace)/powershell-$(vsixVersion).vsix" 
195189                signaturePath : " $(Pipeline.Workspace)/powershell-$(vsixVersion).signature.p7s" 
196190                manifestPath : " $(Pipeline.Workspace)/powershell-$(vsixVersion).manifest" 
197191                preRelease : $(prerelease) 
198192                useCustomVSCE : true 
199193                feed :
200-                   organization : mscodehub 
201-                   project : PowerShellCore 
202-                   feedName : PowerShellCore_PublicPackages 
194+                   organization : msazure 
195+                   project : One 
196+                   feedName : npmjs 
203197            steps :
204198              - pwsh : | 
205199                  Write-Host Publishing: $(vsixVersion), pre-release: $(prerelease) 
0 commit comments