From 06b4585a622c776feceedfba1eb5b8fbd337639a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Stalder?= Date: Thu, 18 Apr 2019 18:06:52 +0200 Subject: [PATCH] docs: fix GitLab CI examples The GitLab CI examples used `$CI_ENVIRONMENT_SLUG` for defining the environment names of the deploy jobs. But this variable is actually the OUTPUT of setting the environment name, thus, it tries to reference itself, but does not exist in that moment. The correct way to set this is to use `$CI_COMMIT_REF_NAME` as based on the documentation of GitLab's dynamic environments. --- docs/community/tutorials/deploying-with-gitlab-ci.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/community/tutorials/deploying-with-gitlab-ci.md b/docs/community/tutorials/deploying-with-gitlab-ci.md index 9e3752bc0..5c7fd2e4d 100644 --- a/docs/community/tutorials/deploying-with-gitlab-ci.md +++ b/docs/community/tutorials/deploying-with-gitlab-ci.md @@ -65,7 +65,7 @@ review_app: image: ilyasemenov/gitlab-ci-git-push stage: deploy environment: - name: review/$CI_ENVIRONMENT_SLUG + name: review/$CI_COMMIT_REF_NAME url: https://$CI_ENVIRONMENT_SLUG.dokku.me/ on_stop: stop_review_app only: @@ -88,7 +88,7 @@ stop_review_app: image: ilyasemenov/gitlab-ci-git-push stage: deploy environment: - name: review/$CI_ENVIRONMENT_SLUG + name: review/$CI_COMMIT_REF_NAME action: stop when: manual script: