-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathazure-pipelines.yml
79 lines (67 loc) · 1.99 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
trigger:
- master
resources:
- repo: self
variables:
dockerRegistryServiceConnection: '{EnterServiceConnection}'
vmImageName: 'ubuntu-latest'
containerRegistry: '{YourACRName}.azurecr.io'
tag: '$(Build.BuildId)'
apicontainerimage: $(containerRegistry)/api:$(tag)
websitecontainerimage: $(containerRegistry)/website:$(tag)
imagePullSecret: 'acr-auth'
apiManifestName: 'apimanifest'
websiteManifestName: 'websitemanifest'
apiname: 'middle-api'
stages:
- stage: Build
displayName: Build stage
jobs:
- template: ./DevOps/BuildPipeline.yaml
parameters:
name: BuildAPI
imageRepository: api
dockerfilePath: Source/AKSAPI/Dockerfile.ci
artifactName: $(apiManifestName)
artifactPath: 'DevOps/Manifests/API'
- template: ./DevOps/BuildPipeline.yaml
parameters:
name: BuildWebsite
imageRepository: website
dockerfilePath: Source/AKSWebsite/Dockerfile.ci
artifactName: $(websiteManifestName)
artifactPath: 'DevOps/Manifests/Website'
- stage: DeployToDev
displayName: Deploy to Dev
dependsOn: Build
variables:
k8sNamespace: 'dev'
theme: 'default'
jobs:
- template: ./DevOps/ReleasePipeline.yaml
parameters:
name: DeployAPIDev
artifactName: $(apiManifestName)
environment: 'Dev.dev'
- template: ./DevOps/ReleasePipeline.yaml
parameters:
name: DeployWebsiteDev
artifactName: $(websiteManifestName)
environment: 'Dev.dev'
- stage: DeployToProduction
displayName: Deploy to Production
dependsOn: DeployToDev
variables:
k8sNamespace: 'prod'
theme: 'red'
jobs:
- template: ./DevOps/ReleasePipeline.yaml
parameters:
name: DeployAPIProd
artifactName: $(apiManifestName)
environment: 'Prod.prod'
- template: ./DevOps/ReleasePipeline.yaml
parameters:
name: DeployWebsiteProd
artifactName: $(websiteManifestName)
environment: 'Prod.prod'