Skip to content
Snippets Groups Projects
Verified Commit aa34ce3d authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

remove RELEASE_NAME variable because of https://gitlab.com/gitlab-org/gitlab/-/issues/293674

parent 99c1a204
No related branches found
No related tags found
1 merge request!170Resolve "Can't install the chart twice into the same namespace"
Pipeline #15940 failed with stages
in 6 minutes and 52 seconds
......@@ -24,7 +24,7 @@ include:
stage: install-helm-chart
script:
- cd ${CHART_DIR:-"."}
- ./fully-delete-helmrelease.sh "$RELEASE_NAME"
- ./fully-delete-helmrelease.sh "nc$CI_MERGE_REQUEST_IID"
extends:
- .use_kubernetes
- .chart_changes_rules
......@@ -39,7 +39,6 @@ stages:
variables:
CHART_NAME: nextcloud-onlyoffice
RELEASE_NAME: "nc$CI_MERGE_REQUEST_IID"
pre-install-delete-helmrelease:
extends:
......@@ -55,7 +54,7 @@ post-install-delete-helmrelease:
# Gets triggered by on_stop of install-helmrelease, or manually
when: manual
environment:
name: helmrelease/$RELEASE_NAME
name: helmrelease/nc$CI_MERGE_REQUEST_IID
action: stop
install-helmrelease:
......@@ -71,14 +70,14 @@ install-helmrelease:
- cp values-local.yaml.example values-ci.yaml
# This sets the domains to files-MR_ID.gitlab.stackspin.net and
# office-MR_ID.gitlab.stackspin.net
- sed -i "s/\.your\.domain/-$RELEASE_NAME.gitlab.stackspin.net/" values-ci.yaml
- sed -i "s/\.your\.domain/-nc$CI_MERGE_REQUEST_IID.gitlab.stackspin.net/" values-ci.yaml
# Make sure TLS certificate secrets for different MRs do not clash
- sed -i "s/files-cert/files-cert-$RELEASE_NAME/" values-ci.yaml
- sed -i "s/office-cert/office-cert-$RELEASE_NAME/" values-ci.yaml
- helm install --wait "$RELEASE_NAME" . -f values-ci.yaml
- sed -i "s/files-cert/files-cert-nc$CI_MERGE_REQUEST_IID/" values-ci.yaml
- sed -i "s/office-cert/office-cert-nc$CI_MERGE_REQUEST_IID/" values-ci.yaml
- helm install --wait "nc$CI_MERGE_REQUEST_IID" . -f values-ci.yaml
environment:
name: helmrelease/$RELEASE_NAME
url: https://files-$RELEASE_NAME.gitlab.stackspin.net
name: helmrelease/nc$CI_MERGE_REQUEST_IID
url: https://files-nc$CI_MERGE_REQUEST_IID.gitlab.stackspin.net
auto_stop_in: 1 week
on_stop: post-install-delete-helmrelease
extends:
......@@ -89,7 +88,7 @@ test-helm-chart:
stage: test-helm-chart
script:
- cd ${CHART_DIR:-"."}
- helm test --logs "$RELEASE_NAME"
- helm test --logs "nc$CI_MERGE_REQUEST_IID"
extends:
- .use_kubernetes
- .chart_changes_rules
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