diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 04a6bce..284fdf9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,8 +17,6 @@ variables: value: '0.x' - name: 'nodeVersion' value: '16.x' - - name: 'marketplaceServiceConnection' - value: '24325a98-0d4b-4180-9936-c930a4156258' stages: - stage: 'Build' @@ -48,13 +46,13 @@ stages: - script: | npm run build - - task: TfxInstaller@4 + - task: TfxInstaller@5 displayName: 'Use Node CLI for Azure DevOps' inputs: version: $(tfxVersion) checkLatest: true - - task: PackageAzureDevOpsExtension@4 + - task: PackageAzureDevOpsExtension@5 displayName: 'Package Extension: $(Build.SourcesDirectory)' name: 'packageStep' inputs: @@ -131,24 +129,12 @@ stages: versionSpec: $(nodeVersion) displayName: 'Install Node.js' - - task: TfxInstaller@4 + - task: TfxInstaller@5 displayName: 'Use Node CLI for Azure DevOps' inputs: version: $(tfxVersion) checkLatest: true - #- task: AzureCLI@2 - # displayName: 'Authenticate with Service Principal' - # inputs: - # azureSubscription: 'azure-devops-marketplace' - # scriptType: 'pscore' - # scriptLocation: 'inlineScript' - # useGlobalConfig: true - # inlineScript: | - # $accessToken = az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query "accessToken" --output tsv - # write-host "##vso[task.setsecret]$accessToken" - # write-host "##vso[task.setendpoint id=$env:MARKETPLACESERVICECONNECTION;field=authParameter;key=password]$accessToken" - - task: PublishAzureDevOpsExtension@5 name: 'publishDev' inputs: @@ -164,10 +150,10 @@ stages: shareWith: 'jessehouwing-dev' noWaitValidation: true - - task: IsAzureDevOpsExtensionValid@4 + - task: IsAzureDevOpsExtensionValid@5 inputs: - connectTo: 'VsTeam' - connectedServiceName: '$(marketplaceServiceConnection)' + connectTo: 'AzureRM' + connectedServiceNameAzureRM: 'azure-devops-marketplace' method: 'vsix' vsixFile: '$(publishDev.Extension.OutputPath)' @@ -197,29 +183,17 @@ stages: versionSpec: $(nodeVersion) displayName: 'Install Node.js' - - task: TfxInstaller@4 + - task: TfxInstaller@5 displayName: 'Use Node CLI for Azure DevOps' inputs: version: $(tfxVersion) checkLatest: true - - task: AzureCLI@2 - displayName: 'Authenticate with Service Principal' - inputs: - azureSubscription: 'azure-devops-marketplace' - scriptType: 'pscore' - scriptLocation: 'inlineScript' - useGlobalConfig: true - inlineScript: | - $accessToken = az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query "accessToken" --output tsv - write-host "##vso[task.setsecret]$accessToken" - write-host "##vso[task.setendpoint id=$env:MARKETPLACESERVICECONNECTION;field=authParameter;key=password]$accessToken" - - - task: PublishAzureDevOpsExtension@4 + - task: PublishAzureDevOpsExtension@5 name: 'publishProd' inputs: - connectTo: 'VsTeam' - connectedServiceName: '$(marketplaceServiceConnection)' + connectTo: 'AzureRM' + connectedServiceNameAzureRM: 'azure-devops-marketplace' fileType: 'vsix' vsixFile: '$(Pipeline.Workspace)/vsix/$(extensionId).vsix' publisherId: 'jessehouwing' @@ -228,10 +202,10 @@ stages: extensionVisibility: 'public' noWaitValidation: true - - task: IsAzureDevOpsExtensionValid@4 + - task: IsAzureDevOpsExtensionValid@5 inputs: - connectTo: 'VsTeam' - connectedServiceName: '$(marketplaceServiceConnection)' + connectTo: 'AzureRM' + connectedServiceNameAzureRM: 'azure-devops-marketplace' method: 'vsix' vsixFile: '$(publishProd.Extension.OutputPath)'