-
Notifications
You must be signed in to change notification settings - Fork 831
/
azure-pipelines.yml
67 lines (57 loc) · 1.48 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
# trigger:
# - master
pr:
branches:
include:
- dev
resources:
- repo: self
variables:
tag: '$(Build.BuildId)'
stages:
- stage: Build
displayName: Build image
jobs:
- job: Build
displayName: Build
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Docker@2
displayName: Build an image
inputs:
containerRegistry: 'DockerHubConnnection'
repository: 'houssemdocker/products-web'
command: 'build'
Dockerfile: '**/Dockerfile'
tags: '$(tag)'
- task: Docker@2
displayName: Push an image
inputs:
containerRegistry: 'DockerHubConnnection'
repository: 'houssemdocker/products-web'
command: 'push'
Dockerfile: '**/Dockerfile'
tags: '$(tag)'
- stage: Deploy
displayName: Deploy Helm
jobs:
- job: Deploy
displayName: Deploy
pool:
vmImage: 'ubuntu-latest'
steps:
- task: HelmInstaller@1
inputs:
helmVersionToInstall: '3.2.3'
- task: HelmDeploy@0
inputs:
connectionType: 'Azure Resource Manager'
azureSubscription: 'Visual Studio Enterprise(17b12858-3960-4e6f-a663-a06fdae23428)'
azureResourceGroup: 'aks-demo'
kubernetesCluster: 'aks-demo'
command: 'upgrade'
chartType: 'FilePath'
chartPath: 'charts/productsstore'
releaseName: 'productsstore'
arguments: '--set web.image.tag=$(tag) --set web.image.name=products-web --set namespace=helm-app'