Skip to content
Snippets Groups Projects
Verified Commit e1535280 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Do not use envsubst

parent cfba7254
No related branches found
No related tags found
1 merge request!50Add k8s deployment
Pipeline #179570 passed with warnings
...@@ -64,7 +64,7 @@ deploy production: ...@@ -64,7 +64,7 @@ deploy production:
script: script:
- cd deploy/overlays/production - cd deploy/overlays/production
- kustomize edit set image registry.edugit.org/teckids/team-pr/teckids.org:$CI_COMMIT_REF_NAME@$(cat ../../../DIGESTFILE) - kustomize edit set image registry.edugit.org/teckids/team-pr/teckids.org:$CI_COMMIT_REF_NAME@$(cat ../../../DIGESTFILE)
- kustomize build | envsubst > output.yaml - kustomize build > output.yaml
- kubectl --kubeconfig=/tmp/kubeconfig apply -f output.yaml - kubectl --kubeconfig=/tmp/kubeconfig apply -f output.yaml
only: only:
- master - master
...@@ -83,7 +83,7 @@ deploy review: ...@@ -83,7 +83,7 @@ deploy review:
script: script:
- cd deploy/overlays/review - cd deploy/overlays/review
- kustomize edit set image registry.edugit.org/teckids/team-pr/teckids.org:$CI_COMMIT_REF_NAME@$(cat ../../../DIGESTFILE) - kustomize edit set image registry.edugit.org/teckids/team-pr/teckids.org:$CI_COMMIT_REF_NAME@$(cat ../../../DIGESTFILE)
- kustomize build | envsubst > output.yaml - kustomize build | sed s/__REVIEW_NAME__/$CI_COMMIT_REF_SLUG/g > output.yaml
- kubectl --kubeconfig=/tmp/kubeconfig apply -f output.yaml - kubectl --kubeconfig=/tmp/kubeconfig apply -f output.yaml
delete review: delete review:
......
...@@ -6,7 +6,7 @@ commonAnnotations: ...@@ -6,7 +6,7 @@ commonAnnotations:
source-repository: https://edugit.org/Teckids/team-pr/teckids.org source-repository: https://edugit.org/Teckids/team-pr/teckids.org
commonLabels: commonLabels:
app: teckids-website app: teckids-website
environment: ${CI_COMMIT_REF_SLUG} environment: __REVIEW_NAME__
namespace: teckids-website namespace: teckids-website
patches: patches:
- target: - target:
...@@ -15,7 +15,10 @@ patches: ...@@ -15,7 +15,10 @@ patches:
patch: |- patch: |-
- op: replace - op: replace
path: /spec/rules/0/host path: /spec/rules/0/host
value: ${CI_COMMIT_REF_SLUG}.review.teckids.org value: __REVIEW_NAME__.review.teckids.org
- op: replace - op: replace
path: /spec/tls/0/hosts/0 path: /spec/tls/0/hosts/0
value: ${CI_COMMIT_REF_SLUG}.review.teckids.org value: __REVIEW_NAME__.review.teckids.org
- op: replace
path: /spec/tls/0/secretName
value: __REVIEW_NAME__-website-tls
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