forked from coderpatros/docker-geoserver-base
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
129 lines (120 loc) · 4.06 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
trigger:
- master
variables:
chartName: 'spi-geoserver'
imageTag: $(Build.BuildNumber)
imageName: spi-geoserver
secretName: spi-geoserver-secret
namespace: spi9-dev
releaseName: spi9-dev-geoserver
myArmServicePrincipalConnection: 'SW Pipeline Ecosystem'
platformTeamArmServicePrincipalConnection: platformteamcontainerregistry2 #michaeldice
myClusterKubernetesConnection: devpusek8s01sph
myContainerRegistryName: devpusecr
#azureSubscriptionEndpoint: 'SW Pipeline Ecosystem'
#kubernetesServiceEndpoint: devpusek8s01sph
#azureContainerRegistry: devpusecr.azurecr.io
resources:
repositories:
- repository: templates
type: git
name: PlatformTeam/platform-service
ref: refs/tags/0.1.0
stages:
- stage: Build
jobs:
- job: 'BuildPushPublish'
steps:
- task: Docker@2
inputs:
command: 'buildAndPush'
Dockerfile: '**/Dockerfile'
containerRegistry: $(myContainerRegistryName)
repository: $(imageName)
tags: $(imageTag)
- template: build-templates/publish-charts-as-artifacts.yaml@templates
parameters:
helmChartFolder: '$(Build.SourcesDirectory)/helm/Charts'
- stage: VolumeClaim
jobs:
- job: perisitentVolume
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: Kubernetes@1
displayName: 'kubectl apply perisitent volume claim'
inputs:
kubernetesServiceEndpoint: $(myClusterKubernetesConnection)
namespace: $(namespace)
command: apply
arguments: -f $(Build.SourcesDirectory)/volume-claim.yaml
- stage: Deploy
jobs:
- template: build-templates/deploy-platform-service-job.yaml@templates
parameters:
myClusterArmServicePrincipalConnection: $(myArmServicePrincipalConnection)
myContainerRegistryArmServicePrincipalConnection: $(myArmServicePrincipalConnection)
platformTeamArmServicePrincipalConnection: $(platformTeamArmServicePrincipalConnection)
myContainerRegistryName: $(myContainerRegistryName)
myClusterKubernetesConnection: $(myClusterKubernetesConnection)
imageName: $(imageName)
imageTag: $(imageTag)
chartName: $(chartName)
namespace: $(namespace)
secretName: $(secretName)
releaseName: $(releaseName)
- stage: ClusterConfig
jobs:
- job: 'AddRBAC'
steps:
- task: Kubernetes@1
displayName: kubectl apply rbac
inputs:
kubernetesServiceEndpoint: $(myClusterKubernetesConnection)
namespace: $(namespace)
command: apply
arguments: -f $(Build.SourcesDirectory)/rbac/rbac-config.yaml
#
#
#
#
# - stage: Build
# jobs:
# - template: build-templates/build-platform-service-job.yaml@templates
# parameters:
# azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
# azureContainerRegistry: $(azureContainerRegistry)
# imageName: $(imageName)
# - stage: Deploy
# jobs:
# - job: perisitentVolume
# pool:
# vmImage: 'ubuntu-16.04'
# steps:
# - task: Kubernetes@1
# displayName: 'kubectl apply perisitent volume claim'
# inputs:
# kubernetesServiceEndpoint: $(kubernetesServiceEndpoint)
# namespace: $(namespace)
# command: apply
# arguments: -f $(Build.SourcesDirectory)/volume-claim.yaml
# - template: build-templates/deploy-platform-service-job.yaml@templates
# parameters:
# azureSubscriptionEndpoint: $(azureSubscriptionEndpoint)
# azureContainerRegistry: $(azureContainerRegistry)
# kubernetesServiceEndpoint: $(kubernetesServiceEndpoint)
# imageName: $(imageName)
# imageTag: $(imageTag)
# chartName: $(chartName)
# namespace: $(namespace)
# secretName: $(secretName)
# releaseName: $(releaseName)
# - job: 'AddRBAC'
# steps:
# - task: Kubernetes@1
# displayName: kubectl apply rbac
# inputs:
# kubernetesServiceEndpoint: $(kubernetesServiceEndpoint)
# namespace: $(namespace)
# command: apply
# arguments: -f $(Build.SourcesDirectory)/rbac/rbac-config.yaml