-
Notifications
You must be signed in to change notification settings - Fork 10
/
pipeline.yml
82 lines (80 loc) · 2.12 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
72
73
74
75
76
77
78
79
80
81
82
name: Agent-$(Date:yyyyMMdd).$(Rev:.r)
trigger:
batch: true
branches:
include:
- master
- dev
variables:
- group: ado-kv
- group: ado-config
stages:
- stage: build
displayName: Build
jobs:
- job: validate
displayName: Terraform Validate and Publish
pool:
vmImage: 'ubuntu-16.04'
steps:
- template: pipelines/templates/setup.yml
- job: image
displayName: Build docker image and helm package
pool:
vmImage: 'ubuntu-16.04'
steps:
- template: pipelines/templates/image.yml
parameters:
env: $(ADO-ENV)
azure_sub: $(azure_sub)
name: $(ADO-NAME)
- stage: dev
displayName: Dev
jobs:
- job: plan
displayName: Plan Terraform for K8s
pool:
vmImage: 'ubuntu-16.04'
steps:
- template: pipelines/templates/plan.yml
parameters:
env: $(ADO-ENV)
azure_sub: $(azure_sub)
name: $(ADO-NAME)
ARMCLIENTID: $(ARM-CLIENT-ID)
ARMCLIENTSECRET: $(ARM-CLIENT-SECRET)
- deployment: cluster
displayName: Apply Terraform for K8s
environment: dev
pool:
vmImage: 'ubuntu-16.04'
dependsOn: plan
strategy:
runOnce:
deploy:
steps:
- template: pipelines/templates/apply.yml
parameters:
env: $(ADO-ENV)
azure_sub: $(azure_sub)
name: $(ADO-NAME)
ARMCLIENTID: $(ARM-CLIENT-ID)
ARMCLIENTSECRET: $(ARM-CLIENT-SECRET)
- deployment: agent
displayName: Deploy Agent via Helm
environment: dev
pool:
vmImage: 'ubuntu-16.04'
dependsOn: cluster
strategy:
runOnce:
deploy:
steps:
- template: pipelines/templates/deploy.yml
parameters:
env: $(ADO-ENV)
azure_sub: $(azure_sub)
name: $(ADO-NAME)
ADOTOKEN: $(ADO-TOKEN)
ADOPOOL: $(ADO-POOL)
ADOORG: $(ADO-ORG)