-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpipeline.yml
71 lines (65 loc) · 2.54 KB
/
pipeline.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
###############################################################################
# Marketplace Extension
#
# Packages and publishes the deploymentqueuing-extension to the marketplace
###############################################################################
trigger:
paths:
include:
- src
- devops/pipelines/marketplace-extension/pipeline.yml
pool:
vmImage: "ubuntu-latest"
variables:
- group: pipeline-extension-settings
stages:
- stage: build_package
displayName: Build and Publish
jobs:
- job: build
steps:
# install the extension cli tool
- task: TfxInstaller@3
displayName: Use Tfx
inputs:
version: "v0.7.x"
# fetch the current extension version
# You must build and upload manually for the first execution
- task: QueryAzureDevOpsExtensionVersion@3
displayName: Fetch Current Extension Version
inputs:
connectTo: 'VsTeam'
connectedServiceName: 'AzureDevOpsMarketplace'
publisherId: '$(PublisherID)'
extensionId: '$(ExtensionID)'
versionAction: 'Patch'
outputVariable: 'Task.Extension.Version'
# Create the vsix package
- task: PackageAzureDevOpsExtension@3
displayName: Package Extension
inputs:
rootFolder: '$(System.DefaultWorkingDirectory)/src'
publisherId: '$(PublisherID)'
extensionId: '$(ExtensionID)'
extensionName: '$(ExtensionName)'
extensionVersion: '$(Task.Extension.Version)'
updateTasksVersion: true
updateTasksVersionType: 'patch'
extensionVisibility: 'private'
extensionPricing: 'free'
# Upload and publish the extension
- task: PublishAzureDevOpsExtension@3
displayName: Publish Extension
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
inputs:
connectTo: 'VsTeam'
connectedServiceName: 'AzureDevOpsMarketplace'
fileType: 'vsix'
vsixFile: '$(System.DefaultWorkingDirectory)/*.vsix'
publisherId: '$(PublisherID)'
extensionId: '$(ExtensionID)'
extensionName: '$(ExtensionName)'
updateTasksVersion: false
extensionVisibility: 'private' # Pipeline Decorators must be private
extensionPricing: 'free'
shareWith: $(SharedWith)