-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
112 lines (103 loc) · 3.27 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
109
110
111
112
parameters:
- name: taskVersion
displayName: 'Task Version'
type: string
default: $(Task.Extension.Version)
- name: deployToDev
displayName: 'Deploy to DEV instead of QA'
type: boolean
default: false
trigger:
branches:
include:
- main
paths:
exclude:
- .github/*
- .azext/*
- .vscode/*
- .ci/*
- docs/*
pr: none
pool:
vmImage: ubuntu-latest
variables:
npm_config_cache: $(Pipeline.Workspace)/.npm
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
marketplaceServiceConnection: 'marketplace-joachim-dalen'
stages:
- stage: 'run_tests'
displayName: Test & Build
jobs:
- job:
steps:
- template: .ci/install.template.yml
- template: .ci/run-tests.template.yml
- stage: package_dev
displayName: '[DEV] Package'
dependsOn: 'run_tests'
condition: and(succeeded(), eq(${{ parameters.deployToDev }}, true), eq(variables.isMain, false))
variables:
- group: 'mp-acceptance-criterias-dev'
jobs:
- template: .ci/build-extension-artifact.template.yml
parameters:
extensionEnv: dev
taskVersion: ${{ parameters.taskVersion }}
generateVersionChangelog: false
- stage: publish_dev
displayName: '[DEV] Publish'
dependsOn: 'package_dev'
condition: and(succeeded(), eq(${{ parameters.deployToDev }}, true), eq(variables.isMain, false))
variables:
- group: 'mp-acceptance-criterias-dev'
jobs:
- template: .ci/publish-extension.template.yml
parameters:
pipelineEnv: acceptance-criterias-dev-env
extensionVisibility: private_preview
- stage: package_qa
displayName: '[QA] Package'
dependsOn: 'run_tests'
condition: and(succeeded(), eq(${{ parameters.deployToDev }}, false), eq(variables.isMain, false))
variables:
- group: 'mp-acceptance-criterias-qa'
jobs:
- template: .ci/build-extension-artifact.template.yml
parameters:
extensionEnv: qa
taskVersion: ${{ parameters.taskVersion }}
generateVersionChangelog: false
- stage: publish_qa
displayName: '[QA] Publish'
dependsOn: 'package_qa'
condition: and(succeeded(), eq(${{ parameters.deployToDev }}, false), eq(variables.isMain, false))
variables:
- group: 'mp-acceptance-criterias-qa'
jobs:
- template: .ci/publish-extension.template.yml
parameters:
pipelineEnv: acceptance-criterias-qa-env
extensionVisibility: private_preview
- stage: package_prod
displayName: '[PROD] Package'
dependsOn: 'run_tests'
condition: and(succeeded(), eq(variables.isMain, true))
variables:
- group: 'mp-acceptance-criterias-prod'
jobs:
- template: .ci/build-extension-artifact.template.yml
parameters:
extensionEnv: prod
taskVersion: ${{ parameters.taskVersion }}
- stage: publish_prod
displayName: '[PROD] Publish'
dependsOn: 'package_prod'
condition: and(succeeded(), eq(variables.isMain, true))
variables:
- group: 'mp-acceptance-criterias-prod'
jobs:
- template: .ci/publish-extension.template.yml
parameters:
pipelineEnv: acceptance-criterias-prod-env
extensionVisibility: public_preview