Commit 80f22558 authored by Anton Smith's avatar Anton Smith Committed by Evan Read

Docs - Add note about env slugs being immutable

parent 512d7b63
...@@ -131,15 +131,27 @@ In summary, with the above `.gitlab-ci.yml` we have achieved the following: ...@@ -131,15 +131,27 @@ In summary, with the above `.gitlab-ci.yml` we have achieved the following:
job will deploy our code to a staging server while the deployment job will deploy our code to a staging server while the deployment
will be recorded in an environment named `staging`. will be recorded in an environment named `staging`.
> Starting with GitLab 8.15, the environment name is exposed to the Runner in #### Environment variables and Runner
> two forms: `$CI_ENVIRONMENT_NAME`, and `$CI_ENVIRONMENT_SLUG`. The first is
> the name given in `.gitlab-ci.yml` (with any variables expanded), while the Starting with GitLab 8.15, the environment name is exposed to the Runner in
> second is a "cleaned-up" version of the name, suitable for use in URLs, DNS, two forms:
> etc.
> - `$CI_ENVIRONMENT_NAME`. The name given in `.gitlab-ci.yml` (with any variables
> Starting with GitLab 9.3, the environment URL is exposed to the Runner via expanded).
> `$CI_ENVIRONMENT_URL`. The URL is expanded from `.gitlab-ci.yml`, or if - `$CI_ENVIRONMENT_SLUG`. A "cleaned-up" version of the name, suitable for use in URLs,
> the URL was not defined there, the external URL from the environment is used. DNS, etc.
If you change the name of an existing environment, the:
- `$CI_ENVIRONMENT_NAME` variable will be updated with the new environment name.
- `$CI_ENVIRONMENT_SLUG` variable will remain unchanged to prevent unintended side
effects.
Starting with GitLab 9.3, the environment URL is exposed to the Runner via
`$CI_ENVIRONMENT_URL`. The URL is expanded from either:
- `.gitlab-ci.yml`.
- The external URL from the environment if not defined in `.gitlab-ci.yml`.
### Configuring manual deployments ### Configuring manual deployments
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment