Commit 60136c2b authored by Gabrecht, Marco's avatar Gabrecht, Marco
Browse files

PushBat

parent 2f8dafde
Pipeline #29768 passed with stages
in 1 minute and 20 seconds
......@@ -82,7 +82,6 @@ deploy-service:
only :
variables:
- $TASK == "1_a"
- $TASK == "prime-ingress"
- $TASK == "3_e"
image:
......@@ -90,13 +89,13 @@ deploy-service:
entrypoint: [""]
script:
- echo prime-$GITLAB_USER_ID.loki.th-luebeck.dev
- sed -i "s/{{ GITLAB_USER_ID }}/$GITLAB_USER_ID/g" "deploy/ingress/$TASK.yaml"
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/prime/prime-deployment.yaml
- kubectl delete -f deploy/ingress || true
- kubectl delete -f deploy/prime || true
- kubectl delete -f deploy/wurzel || true
- kubectl delete -f deploy/wurzel2 || true
- sed -i "s/{{ GITLAB_USER_ID }}/$GITLAB_USER_ID/g" "deploy/ingress/$TASK.yaml"
- kubectl apply -f "deploy/ingress/$TASK.yaml"
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/prime/prime-deployment.yaml
- kubectl apply -f deploy/prime
deploy-services:
......@@ -110,15 +109,15 @@ deploy-services:
entrypoint: [""]
script:
- echo prime-$GITLAB_USER_ID.loki.th-luebeck.dev
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/prime/prime-deployment.yaml
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/wurzel/wurzel-deployment.yaml
- sed -i "s/{{ GITLAB_USER_ID }}/$GITLAB_USER_ID/g" "deploy/ingress/$TASK.yaml"
- kubectl delete -f deploy/ingress || true
- kubectl delete -f deploy/prime || true
- kubectl delete -f deploy/wurzel || true
- kubectl delete -f deploy/wurzel2 || true
- sed -i "s/{{ GITLAB_USER_ID }}/$GITLAB_USER_ID/g" "deploy/ingress/$TASK.yaml"
- kubectl apply -f "deploy/ingress/$TASK.yaml"
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/prime/prime-deployment.yaml
- kubectl apply -f deploy/prime
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/wurzel/wurzel-deployment.yaml
- kubectl apply -f deploy/wurzel
deploy-services2:
......@@ -132,19 +131,19 @@ deploy-services2:
entrypoint: [""]
script:
- echo prime-$GITLAB_USER_ID.loki.th-luebeck.dev
- sed -i "s/{{ GITLAB_USER_ID }}/$GITLAB_USER_ID/g" "deploy/ingress/$TASK.yaml"
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/prime/prime-deployment.yaml
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/wurzel/wurzel-deployment.yaml
- sed -i "s/{{ GITLAB_USER_ID }}/$GITLAB_USER_ID/g" deploy/ingress/"$TASK"2.yaml
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/wurzel2/wurzel-deployment2.yaml
- kubectl delete -f deploy/ingress || true
- kubectl delete -f deploy/prime || true
- kubectl delete -f deploy/wurzel || true
- kubectl delete -f deploy/wurzel2 || true
- sed -i "s/{{ GITLAB_USER_ID }}/$GITLAB_USER_ID/g" "deploy/ingress/$TASK.yaml"
- kubectl apply -f "deploy/ingress/$TASK.yaml"
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/prime/prime-deployment.yaml
- kubectl apply -f deploy/prime
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/wurzel/wurzel-deployment.yaml
- kubectl apply -f deploy/wurzel
- sed -i "s/{{ GITLAB_USER_ID }}/$GITLAB_USER_ID/g" deploy/ingress/"$TASK"2.yaml
- kubectl apply -f deploy/ingress/"$TASK"2.yaml
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/wurzel2/wurzel-deployment2.yaml
- kubectl apply -f deploy/wurzel2
deploy-services3:
......@@ -159,15 +158,15 @@ deploy-services3:
entrypoint: [""]
script:
- echo prime-$GITLAB_USER_ID.loki.th-luebeck.dev
- sed -i "s/{{ GITLAB_USER_ID }}/$GITLAB_USER_ID/g" "deploy/ingress/$TASK.yaml"
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/wurzel/wurzel-deployment.yaml
- sed -i "s/{{ GITLAB_USER_ID }}/$GITLAB_USER_ID/g" deploy/ingress/"$TASK"2.yaml || true
- kubectl delete -f deploy/ingress || true
- kubectl delete -f deploy/prime || true
- kubectl delete -f deploy/wurzel || true
- kubectl delete -f deploy/wurzel2 || true
- sed -i "s/{{ GITLAB_USER_ID }}/$GITLAB_USER_ID/g" "deploy/ingress/$TASK.yaml"
- kubectl apply -f "deploy/ingress/$TASK.yaml"
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/wurzel/wurzel-deployment.yaml
- kubectl apply -f deploy/wurzel
- sed -i "s/{{ GITLAB_USER_ID }}/$GITLAB_USER_ID/g" deploy/ingress/"$TASK"2.yaml || true
- kubectl apply -f deploy/ingress/"$TASK"2.yaml || true
terminate:
......@@ -179,6 +178,11 @@ terminate:
name: $KUBECTL
entrypoint: [""]
script:
- sed -i "s/{{ GITLAB_USER_ID }}/$GITLAB_USER_ID/g" "deploy/ingress/$TASK.yaml"
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/prime/prime-deployment.yaml
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/wurzel/wurzel-deployment.yaml
- sed -i "s/{{ GITLAB_USER_ID }}/$GITLAB_USER_ID/g" deploy/ingress/"$TASK"2.yaml
- sed -i "s+{{ CI_REGISTRY_IMAGE }}+$CI_REGISTRY_IMAGE+g" deploy/wurzel2/wurzel-deployment2.yaml
- kubectl delete -f deploy/ingress || true
- kubectl delete -f deploy/prime || true
- kubectl delete -f deploy/wurzel || true
......
......@@ -7,6 +7,16 @@ logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
log = logging.getLogger()
app = Flask(__name__)
@app.route("/wurzel/info")
def info():
try:
return f"Dies ist der Wurzel Service V1"
except Exception as ex:
log.error(f"Exception: { ex }")
abort(500, f"Fehler Wurzel Service V1")
@app.route("/wurzel/<number>")
def number(number):
try:
......@@ -16,6 +26,7 @@ def number(number):
log.error(f"Exception: { ex }")
abort(500, f"Es ist nicht möglich die Wurzel von {n} zu berechnen.")
@app.errorhandler(404)
def page_not_found(e):
# note that we set the 404 status explicitly
......
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