.gitlab-ci.yml 967 Bytes
Newer Older
Nane Kratzke's avatar
Nane Kratzke committed
1
2
stages:
    - deploy
Nane Kratzke's avatar
Nane Kratzke committed
3
    - inject
4
    - evolution
Nane Kratzke's avatar
Nane Kratzke committed
5
6
7
8
9
10
11
    - teardown

variables:
  KUBECTL: "transit/kubectl-plus:v1.19.4"
  CLUSTER: "rig.th-luebeck.dev"

yelb:
Nane Kratzke's avatar
Nane Kratzke committed
12
13
14
  stage: deploy
  image: $KUBECTL
  script:
Nane Kratzke's avatar
Nane Kratzke committed
15
    - kubectl apply -f deploy/yelb.yaml
Nane Kratzke's avatar
Nane Kratzke committed
16

17
18
19
20
21
yelb-evolution:
  stage: evolution
  image: $KUBECTL
  when: manual
  script:
Nane Kratzke's avatar
Nane Kratzke committed
22
23
    - kubectl apply -f deploy/yelb-evolution.yaml
    - kubectl apply -f deploy/yelb-istio-config.yaml
24

Nane Kratzke's avatar
Nane Kratzke committed
25
26
27
28
29
30
istio:
  stage: inject
  image: $KUBECTL
  when: manual
  script:
    - NS=$(kubectl config view --minify --output 'jsonpath={..namespace}')
31
    - kubectl label ns $NS istio-injection=enabled --overwrite
Nane Kratzke's avatar
Nane Kratzke committed
32
    - kubectl delete -f deploy/yelb.yaml
Nane Kratzke's avatar
Nane Kratzke committed
33
    - sleep 5
Nane Kratzke's avatar
Nane Kratzke committed
34
    - kubectl apply -f deploy/yelb.yaml
Nane Kratzke's avatar
Nane Kratzke committed
35
36
37
38
39
40
41

shutdown:
  stage: teardown
  image: $KUBECTL
  when: manual
  script:
    - NS=$(kubectl config view --minify --output 'jsonpath={..namespace}')
42
    - kubectl label ns $NS istio-injection=disabled --overwrite
Nane Kratzke's avatar
Nane Kratzke committed
43
    - kubectl delete -f deploy/