cic-internal-integration/.gitlab-ci.yml

46 lines
1.9 KiB
YAML
Raw Normal View History

2021-01-24 21:16:22 +01:00
include:
- local: 'ci_templates/.cic-template.yml'
- local: 'apps/contract-migration/.gitlab-ci.yml'
- local: 'apps/cic-eth/.gitlab-ci.yml'
2021-02-06 19:28:08 +01:00
- local: 'apps/cic-ussd/.gitlab-ci.yml'
2021-02-07 03:29:24 +01:00
- local: 'apps/cic-notify/.gitlab-ci.yml'
2021-02-08 18:31:29 +01:00
- local: 'apps/cic-meta/.gitlab-ci.yml'
2021-02-18 06:04:30 +01:00
- local: 'apps/cic-cache/.gitlab-ci.yml'
- local: 'apps/data-seeding/.gitlab-ci.yml'
2021-01-24 21:16:22 +01:00
stages:
- build
- test
2021-08-23 18:50:05 +02:00
- deploy
deploy-k8s-dev:
2021-08-23 19:40:32 +02:00
stage: deploy
image: dtzar/helm-kubectl
variables:
CI_DEBUG_TRACE: "true"
script:
2021-08-23 22:46:17 +02:00
- kubectl config set-cluster k8s --server="${K8S_DEV_SERVER?dev server missing}"
2021-08-23 19:40:32 +02:00
- kubectl config set clusters.k8s.certificate-authority-data ${K8S_DEV_CERTIFICATE_AUTHORITY_DATA}
- kubectl config set-credentials gitlab --token="${K8S_DEV_USER_TOKEN}"
2021-08-23 22:46:17 +02:00
- kubectl config set-context grassroots --cluster=k8s --user=gitlab --namespace grassroots
- kubectl config use-context grassroots
2021-08-23 19:40:32 +02:00
#- sed -i "s/<VERSION>/${CI_COMMIT_SHORT_SHA}/g" deployment.yaml
#- kubectl apply -f deployment.yaml
2021-08-23 22:46:17 +02:00
- echo "Wiping state..."
- kubectl delete jobs.batch --all
2021-08-24 18:48:38 +02:00
- kubectl delete hr postgresql && kubectl delete pvc -l 'app.kubernetes.io/name=postgresql'
2021-08-23 22:46:17 +02:00
- kubectl delete sts,pvc -l 'app=bloxberg-validator'
2021-08-24 18:48:38 +02:00
- kubectl delete hr redis && kubectl delete pvc -l 'app=redis'
2021-08-23 22:52:41 +02:00
- kubectl apply -f kubernetes/eth-node/ -f kubernetes/postgresql/ -f kubernetes/redis/
2021-08-24 18:48:38 +02:00
- echo "deploy and run database migrations..."
2021-08-24 21:22:34 +02:00
- kubectl apply -f kubernetes/cic-auth-proxy
- kubectl apply -f kubernetes/cic-cache
- kubectl apply -f kubernetes/cic-eth
- kubectl apply -f kubernetes/cic-meta
- kubectl apply -f kubernetes/cic-notify
- kubectl apply -f kubernetes/cic-staff-client
- kubectl apply -f kubernetes/cic-ussd
2021-08-23 22:46:17 +02:00
- echo "run contract migrations..."
2021-08-23 22:52:41 +02:00
- kubectl apply -f kubernetes/contract-migration/contract-migration-job.yaml