-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
47 lines (44 loc) · 1.28 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
43
44
45
46
47
stages:
- build
# - test
# - deploy
# Build stage1
build:
stage: build
tags:
- elk
script:
- echo "Building the application..."
- kubectl create namespace monitoring
- cd kubernetes/postgres
- kubectl apply -f pv.yaml -f pvc.yaml
- kubectl apply -f deployment.yaml -f service.yaml -f secret.yaml
- cd ../django
- kubectl apply -f deployment.yaml -f service.yaml -f ingress.yaml
- cd ../elasticsearch
- helm install elasticsearch elastic/elasticsearch -f values.yml -n monitoring
- cd ../filebeat
helm install filebeat elastic/filebeat -f values.yml -n monitoring
- cd ../logstash
helm install logstash elastic/logstash -f values.yml -n monitoring
# - cd kubernetes/kibana
# helm install kibana elastic/kibana -f values.yml -n monitoring
- echo "Build completed"
# # Test stage
# test:
# stage: test
# tags:
# - elk
# script:
# - echo "Running tests..."
# # Add your test commands here, e.g., unit tests, integration tests, etc.
# - echo "Tests completed"
# # Deploy stage
# deploy:
# stage: deploy
# tags:
# - elk
# script:
# - echo "Deploying the application..."
# # Add your deployment commands here, e.g., deploy to server, Kubernetes, etc.
# - echo "Deployment completed"