-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
47 lines (41 loc) · 1.16 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
---
include:
## create chaosengine to inject chaos on the app....
- remote: 'https://raw.githubusercontent.com/litmuschaos/litmus/master/ci/gitlab/templates/pod-delete/pod-failure-template.yml'
stages:
- appDeploy
- chaosInfraSetup
- chaosChartPull
- chaosInject
- chaosInfraCleanup
Deploy to Staging:
stage: appDeploy
image: ksatchit/gitlab-runner:ci
script:
- kubectl apply -f ./sample_apps/nginx/stateless/
Setup Chaos Infra:
stage: chaosInfraSetup
image: ksatchit/gitlab-runner:ci
script:
- ./hack/helm_setup --name=litmus --chart=litmus --namespace=litmus
Install Chaos Charts:
stage: chaosChartPull
image: ksatchit/gitlab-runner:ci
script:
- ./hack/helm_setup --name=chaos-experiments --chart=kubernetes --namespace=default
Inject Pod Failure Chaos:
stage: chaosInject
extends: .pod_failure_template
before_script:
variables:
app_ns: default
app_label: "app=nginx"
app_kind: deployment
app_svc_account: nginx
Cleanup Chaos Infra:
stage: chaosInfraCleanup
image: ksatchit/gitlab-runner:ci
script:
- ./hack/helm_teardown litmus chaos-experiments
- ./hack/helm_teardown crds
when: always