Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
5f98c996
Commit
5f98c996
authored
Jun 16, 2016
by
Mark Pundsack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document environments and deployments
parent
fb2b1ae1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
0 deletions
+60
-0
doc/ci/README.md
doc/ci/README.md
+1
-0
doc/ci/environments.md
doc/ci/environments.md
+59
-0
No files found.
doc/ci/README.md
View file @
5f98c996
...
...
@@ -5,6 +5,7 @@
-
[
Get started with GitLab CI
](
quick_start/README.md
)
-
[
CI examples for various languages
](
examples/README.md
)
-
[
Learn how to enable or disable GitLab CI
](
enable_or_disable_ci.md
)
-
[
Environments and deployments
](
environments.md
)
-
[
Learn how `.gitlab-ci.yml` works
](
yaml/README.md
)
-
[
Configure a Runner, the application that runs your builds
](
runners/README.md
)
-
[
Use Docker images with GitLab Runner
](
docker/using_docker_images.md
)
...
...
doc/ci/environments.md
0 → 100644
View file @
5f98c996
# Introduction to environments and deployments
>**Note:**
Introduced in GitLab 8.9.
## Environments
Environments are places where code gets deployed, such as staging or production.
CI/CD [Pipelines] usually have one or more [jobs] that deploy to an environment.
Defining environments in a project's
`.gitlab-ci.yml`
lets developers track
[deployments] to these environments.
## Deployments
Deployments are created when [jobs] deploy versions of code to [environments].
## Defining environments
>**Note:**
You can create and delete environments manually in the web interface, but we
recommend that you define your environments in
`.gitlab-ci.yml`
first, which
will automatically create environments for you after the first deploy.
The
`environment`
is just a hint for GitLab that this job actually deploys to
this environment. Each time the job succeeds, a deployment is recorded,
remembering the git SHA and environment.
Add something like this to your
`.gitlab-ci.yml`
:
```
production:
stage: deploy
script: dpl...
environment: production
```
See full
[
documentation
](
yaml/README.md#environment
)
.
## Seeing environment status
You can find the environment list under
**Pipelines > Environments**
for your
project. You'll see the git SHA and date of the last deployment to each
environment defined.
>**Note:**
Only deploys that happen after your
`.gitlab-ci.yml`
is properly configured will
show up in the environments and deployments lists.
## Seeing deployment history
Clicking on an environment will show the history of deployments.
>**Note:**
Only deploys that happen after your
`.gitlab-ci.yml`
is properly configured will
show up in the environments and deployments lists.
[
Pipelines
]:
quick_start/README.md
[
jobs
]:
yaml/README.md#jobs
[
environments
]:
#environments
[
deployments
]:
#deployments
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