Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-09-15 00:33:10 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-09-19 11:07:13 +0300
commit4a5c21728ee4e6c3ef8e1c410ee0f0c9a47634cc (patch)
tree5f9d3dea6b66db45c88a84f838ca92a1bb553a9d /doc
parent274d3d50e5d24bef18098ee16464873e17fa010a (diff)
Added documentation about dynamic environments
Diffstat (limited to 'doc')
-rw-r--r--doc/ci/yaml/README.md29
1 files changed, 28 insertions, 1 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index ff4c8ddc54b..4772565fac9 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -553,7 +553,7 @@ GitLab.
If `environment` is specified and no environment under that name exists, a new
one will be created automatically.
-The `environment` name must contain only letters, digits, '-' and '_'. Common
+The `environment` name must be a valid git reference name. Common
names are `qa`, `staging`, and `production`, but you can use whatever name works
with your workflow.
@@ -571,6 +571,33 @@ deploy to production:
The `deploy to production` job will be marked as doing deployment to
`production` environment.
+#### dynamic environments
+
+>**Note:**
+Introduced in GitLab 8.12.
+
+`environment` can also represent a configuration hash with `name` and `url`.
+These parameters can use any of defined CI variables (including predefined, secure variables and .gitlab-ci.yml variables).
+
+The common use case is to create a dynamic environments for branches and use them as review apps.
+
+---
+
+**Example configurations**
+
+```
+deploy as review app:
+ stage: deploy
+ script: ...
+ environment:
+ name: review-apps/$CI_BUILD_REF_NAME
+ url: https://$CI_BUILD_REF_NAME.review.example.com/
+```
+
+The `deploy to production` job will be marked as doing deployment to
+`production` environment.
+
+
### artifacts
>**Notes:**