Commit 1fd1ea25 authored by Nane Kratzke's avatar Nane Kratzke
Browse files

Aktualisieren .gitlab-ci.yml

parent 001092db
variables:
KUBECTL: "quay.io/bitnami/kubectl:1.18"
NAMESPACE: "nane-kratzke"
URL: "$GITLAB_USER_NAME.loki.th-luebeck.dev"
PRIME: "yes"
CACHE: "no"
PERSISTENT_CACHE: "no"
......@@ -19,13 +17,12 @@ prepare:
name: $KUBECTL
entrypoint: [""]
script:
- kubectl apply -f deploy/storage -n $NAMESPACE
- kubectl delete secret gitlab-registry-credentials -n $NAMESPACE || true
- kubectl apply -f deploy/storage
- kubectl delete secret gitlab-registry-credentials || true
- "kubectl create secret docker-registry gitlab-registry-credentials \
--docker-server=$CI_REGISTRY \
--docker-username=image-registry \
--docker-password=$CI_REGISTRY_TOKEN \
-n $NAMESPACE"
--docker-password=$CI_REGISTRY_TOKEN"
claim-volume:
stage: prepare
......@@ -37,7 +34,7 @@ claim-volume:
name: $KUBECTL
entrypoint: [""]
script:
- kubectl apply -f deploy/storage -n $NAMESPACE
- kubectl apply -f deploy/storage
build-prime:
stage: build
......@@ -60,10 +57,10 @@ deploy-prime:
entrypoint: [""]
script:
- wget -q https://github.com/mikefarah/yq/releases/download/3.4.0/yq_linux_amd64 -O ./yq && chmod +x yq
- ./yq w -i deploy/prime/prime-ingress.yaml spec.rules[0].host $URL
- ./yq w -i deploy/prime/prime-ingress.yaml spec.tls[0].hosts[0] $URL
- kubectl delete -f deploy/prime -n $NAMESPACE || true
- kubectl apply -f deploy/prime -n $NAMESPACE
- ./yq w -i deploy/prime/prime-ingress.yaml spec.rules[0].host $GITLAB_USER_NAME.loki.th-luebeck.dev
- ./yq w -i deploy/prime/prime-ingress.yaml spec.tls[0].hosts[0] $GITLAB_USER_NAME.loki.th-luebeck.dev
- kubectl delete -f deploy/prime || true
- kubectl apply -f deploy/prime
deploy-cache:
stage: deploy
......@@ -76,9 +73,9 @@ deploy-cache:
name: $KUBECTL
entrypoint: [""]
script:
- kubectl delete -f deploy/persistent-redis -n $NAMESPACE || true
- kubectl delete -f deploy/redis -n $NAMESPACE || true
- kubectl apply -f deploy/redis -n $NAMESPACE
- kubectl delete -f deploy/persistent-redis || true
- kubectl delete -f deploy/redis || true
- kubectl apply -f deploy/redis
deploy-persistent-cache:
stage: deploy
......@@ -91,9 +88,9 @@ deploy-persistent-cache:
name: $KUBECTL
entrypoint: [""]
script:
- kubectl delete -f deploy/redis -n $NAMESPACE || true
- kubectl delete -f deploy/persistent-redis -n $NAMESPACE || true
- kubectl apply -f deploy/persistent-redis -n $NAMESPACE
- kubectl delete -f deploy/redis || true
- kubectl delete -f deploy/persistent-redis || true
- kubectl apply -f deploy/persistent-redis
terminate:
stage: terminate
......@@ -104,7 +101,7 @@ terminate:
name: $KUBECTL
entrypoint: [""]
script:
- kubectl delete -f deploy/redis -n $NAMESPACE || true
- kubectl delete -f deploy/redis-persistent -n $NAMESPACE || true
- kubectl delete -f deploy/prime -n $NAMESPACE || true
- kubectl delete -f deploy/storage -n $NAMESPACE || true
- kubectl delete -f deploy/redis -n || true
- kubectl delete -f deploy/redis-persistent -n || true
- kubectl delete -f deploy/prime || true
- kubectl delete -f deploy/storage || true
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment