summaryrefslogtreecommitdiff
path: root/doc/ci/yaml/README.md
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-11-18 20:31:42 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-11-18 20:31:42 +0800
commit578ced29f24f9c0db3159d366a974927fbe3946b (patch)
tree21c33c421b2b435e31eb2923a66563f80bb9eb40 /doc/ci/yaml/README.md
parent6d1c5761cd520f3cb7fa4dbb1a1937c29f468884 (diff)
parent688ff26df3f288e5cd50096a01014188a5e4011b (diff)
downloadgitlab-ce-578ced29f24f9c0db3159d366a974927fbe3946b.tar.gz
Merge remote-tracking branch 'upstream/master' into fix-cancelling-pipelines
* upstream/master: (162 commits) Grapify the repository API Fix wrong link URL Add note pointing to limitations section in environments.md Clarify the limitation for special chars is for Review Apps Change order of limitations list in environments.md Add an example of invalid characters to branches for review apps Grammar fix in environments.md: s/base/basis Add changelog entry for #24276 / !7500 Allow registering users where the username contains dots (.). bump rouge to 2.0.7 Fix indentation Update copy.md with issue guideline updates and merge request guidelines Refactor github import to reduce number of API calls Fix missing URL from environments docs Check all namespaces on validation of new username. Allow sorting groups in API Use the public CE repo URL instead of the one used in the runner Fix typos Fix wrong changelog item Add missing item for 8.13.6 ...
Diffstat (limited to 'doc/ci/yaml/README.md')
-rw-r--r--doc/ci/yaml/README.md50
1 files changed, 33 insertions, 17 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index 5c0e1c44e3f..6fee750c709 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -541,6 +541,8 @@ same manual action multiple times.
An example usage of manual actions is deployment to production.
+Read more at the [environments documentation][env-manual].
+
### environment
> Introduced in GitLab 8.9.
@@ -552,28 +554,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 +576,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`:
@@ -626,7 +629,12 @@ deploy to production:
#### environment:on_stop
-> [Introduced][ce-6669] in GitLab 8.13.
+>
+**Notes:**
+- [Introduced][ce-6669] in GitLab 8.13.
+- Starting with GitLab 8.14, when you have an environment that has a stop action
+ defined, GitLab will automatically trigger a stop action when the associated
+ branch is deleted.
Closing (stoping) environments can be achieved with the `on_stop` keyword defined under
`environment`. It declares a different job that runs in order to close
@@ -681,6 +689,13 @@ The `stop_review_app` job is **required** to have the following keywords defined
These parameters can use any of the defined [CI variables](#variables)
(including predefined, secure variables and `.gitlab-ci.yml` variables).
+>**Note:**
+Be aware than if the branch name contains special characters and you use the
+`$CI_BUILD_REF_NAME` variable to dynamically create environments, there might
+be complications during deployment. Follow the
+[issue 22849](https://gitlab.com/gitlab-org/gitlab-ce/issues/22849) for more
+information.
+
For example:
```
@@ -1210,6 +1225,7 @@ capitalization, the commit will be created but the builds will be skipped.
Visit the [examples README][examples] to see a list of examples using GitLab
CI with various languages.
+[env-manual]: ../environments.md#manually-deploying-to-environments
[examples]: ../examples/README.md
[ce-6323]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6323
[environment]: ../environments.md