-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
42 lines (34 loc) · 1.2 KB
/
.gitlab-ci.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
# Deployment script
.deploy_template: &deploy_template
image: dtzar/helm-kubectl
stage: deploy
script:
- echo "$KUBE" > config
- QUANTUMLEAP_PASSWORD=$(kubectl get secrets/quantumleap-password --template={{.data.password}} --namespace ${NAMESPACE} --kubeconfig config | base64 -d)
- sed -i "s~+quantumleap_password+~${QUANTUMLEAP_PASSWORD}~g" ./grafana/chart/values.yaml
# Apply helm chart into kubernetes with helm command
- helm dependency up quantumleap/chart/
- helm upgrade quantumleap quantumleap/chart/ --install --namespace ${NAMESPACE} --kubeconfig config
- helm upgrade air-quality-app air-quality-app/chart/ --install --namespace ${NAMESPACE} --kubeconfig config
- helm dependency up grafana/chart/
- helm upgrade grafana grafana/chart/ --install --namespace ${NAMESPACE} --kubeconfig config
# Stages
stages:
- deploy
# Staging deployment stage
do deploy staging:
<<: *deploy_template
variables:
NAMESPACE: odala-staging
KUBE: $KUBECONFIG
only:
- /^odala-staging./
# Production deployment stage
do deploy prod:
<<: *deploy_template
variables:
NAMESPACE: odala-production
KUBE: $KUBECONFIG
only:
- odala-production
when: manual