.gitlab-ci.yml 1.26 KB
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
15
  stage: deploy
  image: $KUBECTL
  script:
    - NS=$(kubectl config view --minify --output 'jsonpath={..namespace}')
Nane Kratzke's avatar
Nane Kratzke committed
16
    - VHOST=yelb.$NS.$CLUSTER mo deploy/yelb.yaml | kubectl apply -f -
Nane Kratzke's avatar
Nane Kratzke committed
17

18
19
20
21
22
yelb-evolution:
  stage: evolution
  image: $KUBECTL
  when: manual
  script:
Nane Kratzke's avatar
Nane Kratzke committed
23
    - NS=$(kubectl config view --minify --output 'jsonpath={..namespace}')
24
    - mo deploy/yelb-evolution.yaml | kubectl apply -f -
Nane Kratzke's avatar
Nane Kratzke committed
25
    - VHOST=yelb.$NS.$CLUSTER mo deploy/yelb-istio-config.yaml | kubectl apply -f -
26

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

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