Loading .gitlab-ci.yml +0 −4 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ test-kube-domain: GIT_STRATEGY: none KUBE_INGRESS_BASE_DOMAIN: example.com script: - source /build/deploy-helpers.sh - check_kube_domain test-kube-domain-legacy: Loading @@ -51,7 +50,6 @@ test-kube-domain-legacy: GIT_STRATEGY: none AUTO_DEVOPS_DOMAIN: example.com script: - source /build/deploy-helpers.sh - check_kube_domain && expected_error || failed_as_expected test-kube-domain_error: Loading @@ -59,7 +57,6 @@ test-kube-domain_error: variables: GIT_STRATEGY: none script: - source /build/deploy-helpers.sh - check_kube_domain && expected_error || failed_as_expected test-download-chart: Loading Loading @@ -197,7 +194,6 @@ test-persist-environment-url: test-create-application-secret: <<: *test-job variables: GIT_STRATEGY: none KUBE_NAMESPACE: default CI_ENVIRONMENT_SLUG: production K8S_SECRET_CODE: 12345 Loading Dockerfile +1 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,4 @@ ARG KUBERNETES_VERSION COPY src/ build/ RUN /build/install_dependencies.sh RUN ln -s /build/bin/check_kube_domain /usr/local/bin/ src/bin/check_kube_domain 0 → 100755 +12 −0 Original line number Diff line number Diff line #! /bin/sh if [[ -z "$KUBE_INGRESS_BASE_DOMAIN" ]]; then echo "In order to deploy or use Review Apps," echo "KUBE_INGRESS_BASE_DOMAIN variables must be set" echo "From 11.8, you can set KUBE_INGRESS_BASE_DOMAIN in cluster settings" echo "or by defining a variable at group or project level." echo "You can also manually add it in .gitlab-ci.yml" false else true fi src/deploy-helpers.sh +0 −13 Original line number Diff line number Diff line Loading @@ -6,19 +6,6 @@ auto_database_url=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${CI_ENVIRONM export DATABASE_URL=${DATABASE_URL-$auto_database_url} export TILLER_NAMESPACE=$KUBE_NAMESPACE function check_kube_domain() { if [[ -z "$KUBE_INGRESS_BASE_DOMAIN" ]]; then echo "In order to deploy or use Review Apps," echo "KUBE_INGRESS_BASE_DOMAIN variables must be set" echo "From 11.8, you can set KUBE_INGRESS_BASE_DOMAIN in cluster settings" echo "or by defining a variable at group or project level." echo "You can also manually add it in .gitlab-ci.yml" false else true fi } function download_chart() { if [[ ! -d chart ]]; then auto_chart=${AUTO_DEVOPS_CHART:-gitlab/auto-deploy-app} Loading Loading
.gitlab-ci.yml +0 −4 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ test-kube-domain: GIT_STRATEGY: none KUBE_INGRESS_BASE_DOMAIN: example.com script: - source /build/deploy-helpers.sh - check_kube_domain test-kube-domain-legacy: Loading @@ -51,7 +50,6 @@ test-kube-domain-legacy: GIT_STRATEGY: none AUTO_DEVOPS_DOMAIN: example.com script: - source /build/deploy-helpers.sh - check_kube_domain && expected_error || failed_as_expected test-kube-domain_error: Loading @@ -59,7 +57,6 @@ test-kube-domain_error: variables: GIT_STRATEGY: none script: - source /build/deploy-helpers.sh - check_kube_domain && expected_error || failed_as_expected test-download-chart: Loading Loading @@ -197,7 +194,6 @@ test-persist-environment-url: test-create-application-secret: <<: *test-job variables: GIT_STRATEGY: none KUBE_NAMESPACE: default CI_ENVIRONMENT_SLUG: production K8S_SECRET_CODE: 12345 Loading
Dockerfile +1 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,4 @@ ARG KUBERNETES_VERSION COPY src/ build/ RUN /build/install_dependencies.sh RUN ln -s /build/bin/check_kube_domain /usr/local/bin/
src/bin/check_kube_domain 0 → 100755 +12 −0 Original line number Diff line number Diff line #! /bin/sh if [[ -z "$KUBE_INGRESS_BASE_DOMAIN" ]]; then echo "In order to deploy or use Review Apps," echo "KUBE_INGRESS_BASE_DOMAIN variables must be set" echo "From 11.8, you can set KUBE_INGRESS_BASE_DOMAIN in cluster settings" echo "or by defining a variable at group or project level." echo "You can also manually add it in .gitlab-ci.yml" false else true fi
src/deploy-helpers.sh +0 −13 Original line number Diff line number Diff line Loading @@ -6,19 +6,6 @@ auto_database_url=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${CI_ENVIRONM export DATABASE_URL=${DATABASE_URL-$auto_database_url} export TILLER_NAMESPACE=$KUBE_NAMESPACE function check_kube_domain() { if [[ -z "$KUBE_INGRESS_BASE_DOMAIN" ]]; then echo "In order to deploy or use Review Apps," echo "KUBE_INGRESS_BASE_DOMAIN variables must be set" echo "From 11.8, you can set KUBE_INGRESS_BASE_DOMAIN in cluster settings" echo "or by defining a variable at group or project level." echo "You can also manually add it in .gitlab-ci.yml" false else true fi } function download_chart() { if [[ ! -d chart ]]; then auto_chart=${AUTO_DEVOPS_CHART:-gitlab/auto-deploy-app} Loading