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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
9c645259
Commit
9c645259
authored
Jul 15, 2020
by
Vladimir Shushlin
Committed by
Shinya Maeda
Jul 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add docs for `prepare` keyword on `environment:action:` keyword
parent
2808f734
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
doc/ci/environments/index.md
doc/ci/environments/index.md
+25
-0
No files found.
doc/ci/environments/index.md
View file @
9c645259
...
...
@@ -811,6 +811,31 @@ stopped environment:
Environments can also be deleted by using the
[
Environments API
](
../../api/environments.md#delete-an-environment
)
.
### Prepare an environment
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/208655) in GitLab 13.2.
By default, GitLab creates a
[
deployment
](
#viewing-deployment-history
)
every time a
build with the specified environment runs. Newer deployments can also
[
cancel older ones
](
deployment_safety.md#skip-outdated-deployment-jobs
)
.
You may want to specify an environment keyword to
[
protect builds from unauthorized access
](
protected_environments.md
)
, or to get
access to
[
scoped variables
](
#scoping-environments-with-specs
)
. In these cases,
you can use the
`action: prepare`
keyword to ensure deployments won't be created,
and no builds would be canceled:
```
yaml
build
:
stage
:
build
script
:
-
echo "Building the app"
environment
:
name
:
staging
action
:
prepare
url
:
https://staging.example.com
```
### Grouping similar environments
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/7015) in GitLab 8.14.
...
...
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