提交 ff97de61 编写于 作者: A Achilleas Pipinellis

Move name rules under environment:name in yaml readme

上级 3a6e38db
......@@ -552,28 +552,14 @@ 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.
The `environment` name can contain:
- letters
- digits
- spaces
- `-`
- `_`
- `/`
- `$`
- `{`
- `}`
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
environment:
name: production
```
In the above example, the `deploy to production` job will be marked as doing a
......@@ -588,6 +574,21 @@ 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
- digits
- spaces
- `-`
- `_`
- `/`
- `$`
- `{`
- `}`
Common names are `qa`, `staging`, and `production`, but you can use whatever
name works with your workflow.
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`:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册