-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
azure-pipelines.yml
108 lines (102 loc) · 3.73 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
stages:
- stage: Build
displayName: 'Build vsix file'
variables:
version: $[ counter('revision-new',0) ]
jobs:
- job: Build
displayName: Package the extension
pool:
vmImage: 'windows-2019'
steps:
- task: TfxInstaller@3
inputs:
version: 'v0.9.x'
displayName: 'Use Node CLI for Azure DevOps (tfx-cli): v0.6.x'
- task: PowerShell@2
displayName: 'Increment the task version in task.json'
inputs:
targetType: 'inline'
script: |
$jsonPath = "$(Build.SourcesDirectory)/task/task.json"
$taskJson = Get-Content $jsonPath | ConvertFrom-Json
$taskJson.version.Patch = $(Version)
$taskJson = $taskJson | ConvertTo-Json -Depth 10
Set-Content -Path $jsonPath -Value $taskJson | ConvertTo-Json
- task: PackageAzureDevOpsExtension@3
displayName: 'Package Extension - Private'
inputs:
rootFolder: '$(Build.SourcesDirectory)'
extensionVersion: '1.2.$(Version)'
extensionVisibility: private
extensionPricing: free
extensionId: 'CreatePullRequestDev'
outputPath: '$(Build.ArtifactStagingDirectory)/vsix'
- task: PackageAzureDevOpsExtension@3
displayName: 'Package Extension - Public'
inputs:
rootFolder: '$(Build.SourcesDirectory)'
extensionVersion: '1.2.$(Version)'
extensionVisibility: public
extensionPricing: free
updateTasksVersion: false
outputPath: '$(Build.ArtifactStagingDirectory)/vsix'
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master'))
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\vsix'
- stage: Publish_Private
displayName: Publish to private
dependsOn: Build
jobs:
- deployment: DeployPrivate
environment: Marketplace Private
displayName: Deploy the extension to private
pool:
vmImage: 'Windows-2019'
strategy:
runOnce:
deploy:
steps:
- task: TfxInstaller@3
displayName: 'Use Node CLI for Azure DevOps (tfx-cli): v0.8.x'
inputs:
version: v0.9.x
- task: PublishAzureDevOpsExtension@3
displayName: 'Publish Extension'
inputs:
connectedServiceName: 'new marketplace'
fileType: vsix
vsixFile: '$(Pipeline.Workspace)/drop/ShaykiAbramczyk.CreatePullRequestDev*.vsix'
updateTasksVersion: false
extensionVisibility: private
extensionPricing: free
shareWith: shaykia
- stage: Publish_Public
displayName: Publish to public
dependsOn: Build
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master'))
jobs:
- deployment: DeployPrivate
environment: Marketplace Public
displayName: Deploy the extension to public
pool:
vmImage: 'Windows-2019'
strategy:
runOnce:
deploy:
steps:
- task: TfxInstaller@3
displayName: 'Use Node CLI for Azure DevOps (tfx-cli): v0.8.x'
inputs:
version: v0.9.x
- task: PublishAzureDevOpsExtension@3
displayName: 'Publish Extension'
inputs:
connectedServiceName: 'new marketplace'
fileType: vsix
vsixFile: '$(Pipeline.Workspace)/drop/ShaykiAbramczyk.CreatePullRequest-*.vsix'
updateTasksVersion: false
extensionVisibility: public
extensionPricing: free