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

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

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

istio:
  stage: inject
  image: $KUBECTL
  when: manual
  script:
    - VHOST=yelb.$NS.$CLUSTER
    - NS=$(kubectl config view --minify --output 'jsonpath={..namespace}')
    - kubectl label ns $NS istio-inject=enabled --overwrite
    - mo deploy/yelb.yaml | kubectl delete -f -
    - sleep 5
    - mo deploy/yelb.yaml | kubectl apply -f -

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