BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
067ce273
Commit
067ce273
authored
Jan 30, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patch-11' into 'master'
Fix the documentation to use the correct variable in a code example See merge request !8585
parents
b604c93c
5d69ea26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
environments.md
doc/ci/environments.md
+4
-4
No files found.
doc/ci/environments.md
View file @
067ce273
...
...
@@ -297,7 +297,7 @@ deploy_review:
-
echo "Deploy a review app"
environment
:
name
:
review/$CI_BUILD_REF_NAME
url
:
https://$CI_
BUILD_REF_SLUG.review
.example.com
url
:
https://$CI_
ENVIRONMENT_SLUG
.example.com
only
:
-
branches
except
:
...
...
@@ -318,15 +318,15 @@ also contain `/`, or other characters that would be invalid in a domain name or
URL, we use
`$CI_ENVIRONMENT_SLUG`
in the
`environment:url`
so that the
environment can get a specific and distinct URL for each branch. In this case,
given a
`$CI_BUILD_REF_NAME`
of
`100-Do-The-Thing`
, the URL will be something
like
`https://
review-
100-do-the-4f99a2.example.com`
. Again, the way you set up
like
`https://100-do-the-4f99a2.example.com`
. Again, the way you set up
the web server to serve these requests is based on your setup.
You could also use
`$CI_BUILD_REF_SLUG`
in
`environment:url`
, e.g.:
`https://$CI_BUILD_REF_SLUG.
review.
example.com`
. We use
`$CI_ENVIRONMENT_SLUG`
`https://$CI_BUILD_REF_SLUG.example.com`
. We use
`$CI_ENVIRONMENT_SLUG`
here because it is guaranteed to be unique, but if you're using a workflow like
[
GitLab Flow
][
gitlab-flow
]
, collisions are very unlikely, and you may prefer
environment names to be more closely based on the branch name - the example
above would give you an URL like
`https://100-do-the-thing.
review.
example.com`
above would give you an URL like
`https://100-do-the-thing.example.com`
Last but not least, we tell the job to run
[
`only`
][
only
]
on branches
[
`except`
][
only
]
master.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment