-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmp.yml
118 lines (112 loc) · 3.39 KB
/
tmp.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
113
114
115
116
117
118
trigger:
- development
resources:
- repo: self
variables:
#----Common Values--------------------------
vmImageName: "ubuntu-latest"
containerRegistrySp: 'hcdevusacr-sp'
containerRegistry: 'hcdevusacr'
tag: "$(Build.BuildNumber)"
#-----DEV-------------------------------------
imageRepository-dev: 'hf-ui-dev'
#-----STAGING---------------------------------
imageRepository-staging: 'hf-ui-staging'
#-----PROD---------------------------------
containerRegistrySp-prod: 'hcprodusacr-sp'
containerRegistry-prod: 'hcprodusacr'
imageRepository-prod: 'hf-ui-prod'
stages:
- stage: helm_chart_publish
dependsOn:
displayName: Copy Charts and artifact
jobs:
- job: Publish
displayName: Publish
pool:
vmImage: $(vmImageName)
steps:
- checkout: self
- task: PublishPipelineArtifact@1
inputs:
targetPath: 'helmchart'
artifact: 'drop'
publishLocation: 'pipeline'
- stage: Build_dev
dependsOn:
displayName: Build and push dev acr
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
variables:
- group: hf-ui-dev-k8s
steps:
- task: Docker@2
displayName: "Docker Build"
inputs:
containerRegistry: "$(containerRegistrySp)"
repository: "$(imageRepository-dev)"
command: "build"
Dockerfile: "**/Dockerfile"
tags: "$(tag)"
- task: Docker@2
displayName: "Docker Push to ACR"
inputs:
containerRegistry: "$(containerRegistrySp)"
repository: "$(imageRepository-dev)"
command: "push"
tags: "$(tag)"
- stage: Build_staging
dependsOn:
displayName: Build and push staging acr
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
variables:
- group: hf-ui-staging-k8s
steps:
- task: Docker@2
displayName: "Docker Build"
inputs:
containerRegistry: "$(containerRegistrySp)"
repository: "$(imageRepository-staging)"
command: "build"
Dockerfile: "**/Dockerfile"
tags: "$(tag)"
- task: Docker@2
displayName: "Docker Push to ACR"
inputs:
containerRegistry: "$(containerRegistrySp)"
repository: "$(imageRepository-staging)"
command: "push"
tags: "$(tag)"
- stage: Build_prod
dependsOn:
displayName: Build and push prod acr
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
variables:
- group: hf-ui-prod-k8s
steps:
- task: Docker@2
displayName: "Docker Build"
inputs:
containerRegistry: "$(containerRegistrySp-prod)"
repository: "$(imageRepository-prod)"
command: "build"
Dockerfile: "**/Dockerfile"
tags: "$(tag)"
- task: Docker@2
displayName: "Docker Push to ACR"
inputs:
containerRegistry: "$(containerRegistrySp-prod)"
repository: "$(imageRepository-prod)"
command: "push"
tags: "$(tag)"