Skip to content

Commit a994947

Browse files
committed
Update azure-pipelines.yml for Azure Pipelines
1 parent ff280a9 commit a994947

File tree

1 file changed

+13
-39
lines changed

1 file changed

+13
-39
lines changed

azure-pipelines.yml

Lines changed: 13 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ variables:
1717
value: '0.x'
1818
- name: 'nodeVersion'
1919
value: '16.x'
20-
- name: 'marketplaceServiceConnection'
21-
value: '24325a98-0d4b-4180-9936-c930a4156258'
2220

2321
stages:
2422
- stage: 'Build'
@@ -48,13 +46,13 @@ stages:
4846
- script: |
4947
npm run build
5048
51-
- task: TfxInstaller@4
49+
- task: TfxInstaller@5
5250
displayName: 'Use Node CLI for Azure DevOps'
5351
inputs:
5452
version: $(tfxVersion)
5553
checkLatest: true
5654

57-
- task: PackageAzureDevOpsExtension@4
55+
- task: PackageAzureDevOpsExtension@5
5856
displayName: 'Package Extension: $(Build.SourcesDirectory)'
5957
name: 'packageStep'
6058
inputs:
@@ -131,24 +129,12 @@ stages:
131129
versionSpec: $(nodeVersion)
132130
displayName: 'Install Node.js'
133131

134-
- task: TfxInstaller@4
132+
- task: TfxInstaller@5
135133
displayName: 'Use Node CLI for Azure DevOps'
136134
inputs:
137135
version: $(tfxVersion)
138136
checkLatest: true
139137

140-
#- task: AzureCLI@2
141-
# displayName: 'Authenticate with Service Principal'
142-
# inputs:
143-
# azureSubscription: 'azure-devops-marketplace'
144-
# scriptType: 'pscore'
145-
# scriptLocation: 'inlineScript'
146-
# useGlobalConfig: true
147-
# inlineScript: |
148-
# $accessToken = az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query "accessToken" --output tsv
149-
# write-host "##vso[task.setsecret]$accessToken"
150-
# write-host "##vso[task.setendpoint id=$env:MARKETPLACESERVICECONNECTION;field=authParameter;key=password]$accessToken"
151-
152138
- task: PublishAzureDevOpsExtension@5
153139
name: 'publishDev'
154140
inputs:
@@ -164,10 +150,10 @@ stages:
164150
shareWith: 'jessehouwing-dev'
165151
noWaitValidation: true
166152

167-
- task: IsAzureDevOpsExtensionValid@4
153+
- task: IsAzureDevOpsExtensionValid@5
168154
inputs:
169-
connectTo: 'VsTeam'
170-
connectedServiceName: '$(marketplaceServiceConnection)'
155+
connectTo: 'AzureRM'
156+
connectedServiceNameAzureRM: 'azure-devops-marketplace'
171157
method: 'vsix'
172158
vsixFile: '$(publishDev.Extension.OutputPath)'
173159

@@ -197,29 +183,17 @@ stages:
197183
versionSpec: $(nodeVersion)
198184
displayName: 'Install Node.js'
199185

200-
- task: TfxInstaller@4
186+
- task: TfxInstaller@5
201187
displayName: 'Use Node CLI for Azure DevOps'
202188
inputs:
203189
version: $(tfxVersion)
204190
checkLatest: true
205191

206-
- task: AzureCLI@2
207-
displayName: 'Authenticate with Service Principal'
208-
inputs:
209-
azureSubscription: 'azure-devops-marketplace'
210-
scriptType: 'pscore'
211-
scriptLocation: 'inlineScript'
212-
useGlobalConfig: true
213-
inlineScript: |
214-
$accessToken = az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query "accessToken" --output tsv
215-
write-host "##vso[task.setsecret]$accessToken"
216-
write-host "##vso[task.setendpoint id=$env:MARKETPLACESERVICECONNECTION;field=authParameter;key=password]$accessToken"
217-
218-
- task: PublishAzureDevOpsExtension@4
192+
- task: PublishAzureDevOpsExtension@5
219193
name: 'publishProd'
220194
inputs:
221-
connectTo: 'VsTeam'
222-
connectedServiceName: '$(marketplaceServiceConnection)'
195+
connectTo: 'AzureRM'
196+
connectedServiceNameAzureRM: 'azure-devops-marketplace'
223197
fileType: 'vsix'
224198
vsixFile: '$(Pipeline.Workspace)/vsix/$(extensionId).vsix'
225199
publisherId: 'jessehouwing'
@@ -228,10 +202,10 @@ stages:
228202
extensionVisibility: 'public'
229203
noWaitValidation: true
230204

231-
- task: IsAzureDevOpsExtensionValid@4
205+
- task: IsAzureDevOpsExtensionValid@5
232206
inputs:
233-
connectTo: 'VsTeam'
234-
connectedServiceName: '$(marketplaceServiceConnection)'
207+
connectTo: 'AzureRM'
208+
connectedServiceNameAzureRM: 'azure-devops-marketplace'
235209
method: 'vsix'
236210
vsixFile: '$(publishProd.Extension.OutputPath)'
237211

0 commit comments

Comments
 (0)