Newer
Older
# This file is included as part of the main repository .gitlab-ci.yml file
# NOTE: Since this is running from the root of the repository all referenced
# files must be relative to the root directory.
# Most jobs in this file are only meant to be run when a git tag is created
# Prerequisites:
# Create TLS certificate secret:
# kubectl create -n geosphere secret tls geosphere-tls-certs --cert=geosphere_ssec_wisc_edu.crt --key=geosphere_ssec_wisc_edu.key
gs create geotiff storage:
extends: .helm_based_job
stage: create storage
script:
- echo "$CI_COMMIT_BRANCH"
- echo "$CI_COMMIT_TAG"
- ns=$(./helpers/get_namespace.sh)
# copy secret kubeconfig to the mounted (pwd) directory
- cp $kubekorner_k3s_config .
- kubeconfig=$(basename $kubekorner_k3s_config)
- ./helpers/create_pvc.sh "$ns" "ci_geosphere/geotiff-pvc.yaml" "cspp-geo-geo2grid" "$kubeconfig"
# this job doesn't actually need any artifacts from previous jobs
dependencies: []
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
- changes:
- ci_geosphere/geotiff-pvc.yaml
- if: $CREATE_STORAGE
gs create shapefile storage:
extends: .helm_based_job
stage: create storage
script:
- echo "$CI_COMMIT_BRANCH"
- echo "$CI_COMMIT_TAG"
- ns=$(./helpers/get_namespace.sh)
# copy secret kubeconfig to the mounted (pwd) directory
- cp $kubekorner_k3s_config .
- kubeconfig=$(basename $kubekorner_k3s_config)
- ./helpers/create_pvc.sh "$ns" "ci_geosphere/shapefiles-pvc.yaml" "geosphere-tile-gen-shapefiles" "$kubeconfig"
# this job doesn't actually need any artifacts from previous jobs
dependencies: []
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
- changes:
- ci_geosphere/shapefiles-pvc.yaml
- if: $CREATE_STORAGE
gs deploy rabbit:
environment:
name: geosphere
url: http://geosphere.ssec.wisc.edu
extends: .helm_based_job
stage: deploy rabbit
script:
- ./deploy_rabbitmq.sh ci_geosphere
# this job doesn't actually need any artifacts from previous jobs
dependencies: []
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
# no need to build if another project triggered us
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
- changes:
- ci_geosphere/values-geosphere-rabbit.yaml
- if: $DEPLOY_RABBIT
gs deploy g16 grb:
# environment:
# name: geosphere
# url: http://geosphere.ssec.wisc.edu
extends: .helm_based_job
stage: deploy GRB
script:
- ns=$(./helpers/get_namespace.sh)
- cd geosphere-grb/chart
- source cspp-geo-grb/cibuild.env
# copy secret kubeconfig to the mounted (pwd) directory
- cp $kubekorner_k3s_config .
- kubeconfig=$(basename $kubekorner_k3s_config)
- echo "Deploying version $docker_tag to cluster namespace $ns"
# copy extra values files to the local directory (where helm has access via docker mount)
- cp ../../ci_geosphere/values-grb-g16.yaml .
# namespace names are the same as domain names
- helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns --set persistence.enabled=true --set persistence.storageClass=longhorn -f values-grb-g16.yaml cspp-geo-grb cspp-geo-grb/
dependencies:
- get_chart_grb
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
- when: on_success
gs deploy geo2grid g16 radf:
extends: .deploy_geo2grid
variables:
VALUES_DIR: "ci_geosphere"
DEPLOY_SUFFIX: "-g16-radf.yaml"
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
- when: on_success
gs deploy geo2grid g16 radc:
extends: .deploy_geo2grid
variables:
VALUES_DIR: "ci_geosphere"
DEPLOY_SUFFIX: "-g16-radc.yaml"
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
- when: on_success
gs deploy geo2grid g16 radm1:
extends: .deploy_geo2grid
variables:
VALUES_DIR: "ci_geosphere"
DEPLOY_SUFFIX: "-g16-radm1.yaml"
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
- when: on_success
gs deploy geo2grid g16 radm2:
extends: .deploy_geo2grid
variables:
VALUES_DIR: "ci_geosphere"
DEPLOY_SUFFIX: "-g16-radm2.yaml"
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
- when: on_success
gs deploy tile gen g16 radf:
extends: .deploy_tile_gen
variables:
VALUES_DIR: "ci_geosphere"
DEPLOY_SUFFIX: "-g16-radf"
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
- when: on_success
gs deploy tile gen g16 radc:
extends: .deploy_tile_gen
variables:
VALUES_DIR: "ci_geosphere"
DEPLOY_SUFFIX: "-g16-radc"
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
- when: on_success
gs deploy_tile_gen_g16_radm1:
extends: .deploy_tile_gen
variables:
VALUES_DIR: "ci_geosphere"
DEPLOY_SUFFIX: "-g16-radm1"
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
- when: on_success
gs deploy_tile_gen_g16_radm2:
extends: .deploy_tile_gen
variables:
VALUES_DIR: "ci_geosphere"
DEPLOY_SUFFIX: "-g16-radm2"
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
- when: on_success
gs deploy mapserver:
environment:
name: geosphere
url: http://geosphere.ssec.wisc.edu
variables:
VALUES_DIR: "ci_geosphere"
extends: .deploy_mapserver
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
- when: on_success
gs deploy mapcache:
environment:
name: geosphere
url: http://geosphere.ssec.wisc.edu
variables:
VALUES_DIR: "ci_geosphere"
extends: .deploy_mapcache
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
- when: on_success
gs deploy client:
environment:
name: geosphere
url: http://geosphere.ssec.wisc.edu
extends: .helm_based_job
stage: deploy Client
script:
- ns="geosphere"
- cd geosphere-client/chart
- source geosphere-client/cibuild.env
# copy secret kubeconfig to the mounted (pwd) directory
- cp $kubekorner_k3s_config .
- kubeconfig=$(basename $kubekorner_k3s_config)
- echo "Deploying version $docker_tag to cluster namespace $ns"
# copy extra values files to the local directory (where helm has access via docker mount)
- cp ../../ci_geosphere/values-client.yaml .
# namespace names are the same as domain names
- helm upgrade -v 2 --install --kubeconfig $kubeconfig --namespace $ns -f values-client.yaml geosphere-client geosphere-client/
dependencies:
- get_chart_client
rules:
- if: "$CI_COMMIT_TAG != null"
- if: '$kubekorner_k3s_config == ""'
when: never
- when: on_success