Skip to content
Snippets Groups Projects
Commit f2185869 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

added deployment for development/production

parent 4b409431
No related branches found
No related tags found
2 merge requests!1973Development,!1934Resolve "Update Images"
...@@ -13,6 +13,19 @@ workflow: ...@@ -13,6 +13,19 @@ workflow:
DOCKER_FPM_IMAGE_TAG: $CI_COMMIT_REF_SLUG-$CI_COMMIT_SHA DOCKER_FPM_IMAGE_TAG: $CI_COMMIT_REF_SLUG-$CI_COMMIT_SHA
DOCKER_NGINX_IMAGE_TAG: $CI_COMMIT_REF_SLUG-$CI_COMMIT_SHA DOCKER_NGINX_IMAGE_TAG: $CI_COMMIT_REF_SLUG-$CI_COMMIT_SHA
APP_ENV: development APP_ENV: development
APP_URL: "https://${CI_COMMIT_REF_SLUG}.review.metager.de"
- if: $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "development"
variables:
DOCKER_COMPOSER_IMAGE_TAG: $CI_COMMIT_BRANCH-composer-$CI_COMMIT_SHA
DOCKER_FPM_IMAGE_TAG: $CI_COMMIT_BRANCH-$CI_COMMIT_SHA
DOCKER_NGINX_IMAGE_TAG: $CI_COMMIT_BRANCH-$CI_COMMIT_SHA
- if: $CI_COMMIT_BRANCH == "master"
variables:
APP_URL: https://metager.de
- if: $CI_COMMIT_BRANCH == "development"
variables:
APP_URL: https://metager3.de
stages: stages:
- build_composer - build_composer
- build_dependencies - build_dependencies
......
...@@ -9,6 +9,39 @@ ...@@ -9,6 +9,39 @@
- .gitlab/deployment_scripts/update_secret.sh - .gitlab/deployment_scripts/update_secret.sh
- .gitlab/deployment_scripts/update_deployment.sh - .gitlab/deployment_scripts/update_deployment.sh
deploy_development:
extends:
- .deploy
environment:
name: development
url: https://metager3.de
action: start
variables:
variables:
DEPLOYMENT_URL: "metager3.de"
DEPLOYMENT_HELM_VALUES: .gitlab/development.yaml
DEPLOYMENT_CHART_NAME: $CI_COMMIT_BRANCH
rules:
- if: '$CI_COMMIT_BRANCH != "development"'
when: never
deploy_production:
extends:
- .deploy
environment:
name: production
url: https://metager.de
action: start
variables:
variables:
DEPLOYMENT_URL: "metager.de"
DEPLOYMENT_HELM_VALUES: .gitlab/production.yaml
DEPLOYMENT_CHART_NAME: $CI_COMMIT_BRANCH
rules:
- if: '$CI_COMMIT_BRANCH != "development"'
when: never
deploy_review: deploy_review:
extends: extends:
- .deploy - .deploy
...@@ -22,7 +55,6 @@ deploy_review: ...@@ -22,7 +55,6 @@ deploy_review:
DEPLOYMENT_URL: "${CI_COMMIT_REF_SLUG}.review.metager.de" DEPLOYMENT_URL: "${CI_COMMIT_REF_SLUG}.review.metager.de"
DEPLOYMENT_HELM_VALUES: .gitlab/review.yaml DEPLOYMENT_HELM_VALUES: .gitlab/review.yaml
DEPLOYMENT_CHART_NAME: review-${CI_COMMIT_REF_SLUG} DEPLOYMENT_CHART_NAME: review-${CI_COMMIT_REF_SLUG}
APP_URL: "https://${CI_COMMIT_REF_SLUG}.review.metager.de"
rules: rules:
- if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "development"' - if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "development"'
when: never when: never
......
ingress:
annotations:
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: letsencrypt-prod
hosts:
- host: metager3.de
paths:
- path: /
pathType: ImplementationSpecific
- path: /wsb
pathType: Prefix
backend:
service:
name: wsb
port:
number: 80
tls:
- hosts:
- metager3.de
secretName: metager-tls
\ No newline at end of file
ingress:
annotations:
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: letsencrypt-prod
hosts:
- host: metager.de
paths:
- path: /
pathType: ImplementationSpecific
- path: /wsb
pathType: Prefix
backend:
service:
name: wsb
port:
number: 80
- host: metager.org
paths:
- path: /
pathType: ImplementationSpecific
- path: /wsb
pathType: Prefix
backend:
service:
name: wsb
port:
number: 80
- host: metager.es
paths:
- path: /
pathType: ImplementationSpecific
- path: /wsb
pathType: Prefix
backend:
service:
name: wsb
port:
number: 80
tls:
- hosts:
- metager.de
- metager.org
- metager.es
secretName: metager-tls
\ No newline at end of file
...@@ -6,6 +6,13 @@ ingress: ...@@ -6,6 +6,13 @@ ingress:
- paths: - paths:
- path: / - path: /
pathType: ImplementationSpecific pathType: ImplementationSpecific
- path: /wsb
pathType: Prefix
backend:
service:
name: wsb
port:
number: 80
tls: tls:
- hosts: - hosts:
- "*.review.metager.de" - "*.review.metager.de"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment