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

Aktualisieren .gitlab-ci.yml

parent 001092db
variables: variables:
KUBECTL: "quay.io/bitnami/kubectl:1.18" KUBECTL: "quay.io/bitnami/kubectl:1.18"
NAMESPACE: "nane-kratzke"
URL: "$GITLAB_USER_NAME.loki.th-luebeck.dev"
PRIME: "yes" PRIME: "yes"
CACHE: "no" CACHE: "no"
PERSISTENT_CACHE: "no" PERSISTENT_CACHE: "no"
...@@ -19,13 +17,12 @@ prepare: ...@@ -19,13 +17,12 @@ prepare:
name: $KUBECTL name: $KUBECTL
entrypoint: [""] entrypoint: [""]
script: script:
- kubectl apply -f deploy/storage -n $NAMESPACE - kubectl apply -f deploy/storage
- kubectl delete secret gitlab-registry-credentials -n $NAMESPACE || true - kubectl delete secret gitlab-registry-credentials || true
- "kubectl create secret docker-registry gitlab-registry-credentials \ - "kubectl create secret docker-registry gitlab-registry-credentials \
--docker-server=$CI_REGISTRY \ --docker-server=$CI_REGISTRY \
--docker-username=image-registry \ --docker-username=image-registry \
--docker-password=$CI_REGISTRY_TOKEN \ --docker-password=$CI_REGISTRY_TOKEN"
-n $NAMESPACE"
claim-volume: claim-volume:
stage: prepare stage: prepare
...@@ -37,7 +34,7 @@ claim-volume: ...@@ -37,7 +34,7 @@ claim-volume:
name: $KUBECTL name: $KUBECTL
entrypoint: [""] entrypoint: [""]
script: script:
- kubectl apply -f deploy/storage -n $NAMESPACE - kubectl apply -f deploy/storage
build-prime: build-prime:
stage: build stage: build
...@@ -60,10 +57,10 @@ deploy-prime: ...@@ -60,10 +57,10 @@ deploy-prime:
entrypoint: [""] entrypoint: [""]
script: script:
- wget -q https://github.com/mikefarah/yq/releases/download/3.4.0/yq_linux_amd64 -O ./yq && chmod +x yq - 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.rules[0].host $GITLAB_USER_NAME.loki.th-luebeck.dev
- ./yq w -i deploy/prime/prime-ingress.yaml spec.tls[0].hosts[0] $URL - ./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 -n $NAMESPACE || true - kubectl delete -f deploy/prime || true
- kubectl apply -f deploy/prime -n $NAMESPACE - kubectl apply -f deploy/prime
deploy-cache: deploy-cache:
stage: deploy stage: deploy
...@@ -76,9 +73,9 @@ deploy-cache: ...@@ -76,9 +73,9 @@ deploy-cache:
name: $KUBECTL name: $KUBECTL
entrypoint: [""] entrypoint: [""]
script: script:
- kubectl delete -f deploy/persistent-redis -n $NAMESPACE || true - kubectl delete -f deploy/persistent-redis || true
- kubectl delete -f deploy/redis -n $NAMESPACE || true - kubectl delete -f deploy/redis || true
- kubectl apply -f deploy/redis -n $NAMESPACE - kubectl apply -f deploy/redis
deploy-persistent-cache: deploy-persistent-cache:
stage: deploy stage: deploy
...@@ -91,9 +88,9 @@ deploy-persistent-cache: ...@@ -91,9 +88,9 @@ deploy-persistent-cache:
name: $KUBECTL name: $KUBECTL
entrypoint: [""] entrypoint: [""]
script: script:
- kubectl delete -f deploy/redis -n $NAMESPACE || true - kubectl delete -f deploy/redis || true
- kubectl delete -f deploy/persistent-redis -n $NAMESPACE || true - kubectl delete -f deploy/persistent-redis || true
- kubectl apply -f deploy/persistent-redis -n $NAMESPACE - kubectl apply -f deploy/persistent-redis
terminate: terminate:
stage: terminate stage: terminate
...@@ -104,7 +101,7 @@ terminate: ...@@ -104,7 +101,7 @@ terminate:
name: $KUBECTL name: $KUBECTL
entrypoint: [""] entrypoint: [""]
script: script:
- kubectl delete -f deploy/redis -n $NAMESPACE || true - kubectl delete -f deploy/redis -n || true
- kubectl delete -f deploy/redis-persistent -n $NAMESPACE || true - kubectl delete -f deploy/redis-persistent -n || true
- kubectl delete -f deploy/prime -n $NAMESPACE || true - kubectl delete -f deploy/prime || true
- kubectl delete -f deploy/storage -n $NAMESPACE || 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