Move name rules under environment:name in yaml readme

This commit is contained in:
Achilleas Pipinellis 2016-11-17 08:54:51 +01:00
parent 3a6e38db53
commit ff97de61df
1 changed files with 22 additions and 21 deletions

View File

@ -552,6 +552,28 @@ An example usage of manual actions is deployment to production.
If `environment` is specified and no environment under that name exists, a new
one will be created automatically.
In its simplest form, the `environment` keyword can be defined like:
```
deploy to production:
stage: deploy
script: git push production HEAD:master
environment:
name: production
```
In the above example, the `deploy to production` job will be marked as doing a
deployment to the `production` environment.
#### environment:name
> Introduced in GitLab 8.11.
>**Note:**
Before GitLab 8.11, the name of an environment could be defined as a string like
`environment: production`. The recommended way now is to define it under the
`name` keyword.
The `environment` name can contain:
- letters
@ -567,27 +589,6 @@ The `environment` name can contain:
Common names are `qa`, `staging`, and `production`, but you can use whatever
name works with your workflow.
In its simplest form, the `environment` keyword can be defined like:
```
deploy to production:
stage: deploy
script: git push production HEAD:master
environment: production
```
In the above example, the `deploy to production` job will be marked as doing a
deployment to the `production` environment.
#### environment:name
> Introduced in GitLab 8.11.
>**Note:**
Before GitLab 8.11, the name of an environment could be defined as a string like
`environment: production`. The recommended way now is to define it under the
`name` keyword.
Instead of defining the name of the environment right after the `environment`
keyword, it is also possible to define it as a separate value. For that, use
the `name` keyword under `environment`: