Commit 0393f63e authored by Shinya Maeda's avatar Shinya Maeda

Merge branch...

Merge branch '208655-annotate-non-deployment-jobs-with-prepare-keyword-on-environment-action-keyword' into 'master'

Add docs for `prepare` keyword on `environment:action:` keyword

See merge request gitlab-org/gitlab!36568
parents 4cba95c9 9c645259
...@@ -811,6 +811,31 @@ stopped environment: ...@@ -811,6 +811,31 @@ stopped environment:
Environments can also be deleted by using the [Environments API](../../api/environments.md#delete-an-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 ### Grouping similar environments
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/7015) in GitLab 8.14. > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/7015) in GitLab 8.14.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment