Commit b546f3aa authored by Thong Kuah's avatar Thong Kuah
Browse files

persist_environment_url and test happy path

parent cf37032c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -133,6 +133,16 @@ test-create-secret-public-project:
    - create_secret
    - kubectl get secret gitlab-registry -n $KUBE_NAMESPACE && expected_error || failed_as_expected

test-persist-environment-url:
  stage: test
  image: "$BUILD_IMAGE_NAME"
  variables:
    CI_ENVIRONMENT_URL: review-app.example.com
  script:
    - source /build/deploy-helpers.sh
    - persist_environment_url
    - grep review-app.example.com environment_url.txt

before_script:
  - |
    function expected_error() {
+4 −0
Original line number Diff line number Diff line
@@ -71,3 +71,7 @@ function create_secret() {
    --docker-email="$GITLAB_USER_EMAIL" \
    -o yaml --dry-run | kubectl replace -n "$KUBE_NAMESPACE" --force -f -
}

function persist_environment_url() {
  echo $CI_ENVIRONMENT_URL > environment_url.txt
}