Commit edc9e862 authored by Marcia Ramos's avatar Marcia Ramos

Merge branch 'docs-clarify-environment-action-prepare-header' into 'master'

Clarify environment:action:prepare headline

See merge request gitlab-org/gitlab!56894
parents f1c63c0a da7c2528
...@@ -497,19 +497,17 @@ To delete a stopped environment in the GitLab UI: ...@@ -497,19 +497,17 @@ To delete a stopped environment in the GitLab UI:
1. Next to the environment you want to delete, select **Delete environment**. 1. Next to the environment you want to delete, select **Delete environment**.
1. On the confirmation dialog box, select **Delete environment**. 1. On the confirmation dialog box, select **Delete environment**.
### Prepare an environment ### Prepare an environment without creating a deployment
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/208655) in GitLab 13.2. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/208655) in GitLab 13.2.
By default, GitLab creates a deployment every time a By default, whenever GitLab CI/CD runs a job for a specific environment, it
build with the specified environment runs. Newer deployments can also triggers a deployment and [(optionally) cancels outdated
[cancel older ones](deployment_safety.md#skip-outdated-deployment-jobs). deployments](deployment_safety.md#ensure-only-one-deployment-job-runs-at-a-time).
You may want to specify an environment keyword to To use an environment without creating a new deployment, and without
[protect builds from unauthorized access](protected_environments.md), or to get cancelling outdated deployments, append the keyword `action: prepare` to your
access to [environment-scoped variables](#scoping-environments-with-specs). In these cases, job:
you can use the `action: prepare` keyword to ensure deployments aren't created,
and no builds are canceled:
```yaml ```yaml
build: build:
...@@ -522,6 +520,9 @@ build: ...@@ -522,6 +520,9 @@ build:
url: https://staging.example.com url: https://staging.example.com
``` ```
This gives you access to [environment-scoped variables](#scoping-environments-with-specs),
and can be used to [protect builds from unauthorized access](protected_environments.md).
### Group similar environments ### Group 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.
......
...@@ -2579,9 +2579,9 @@ Use the `action` keyword to specify jobs that prepare, start, or stop environmen ...@@ -2579,9 +2579,9 @@ Use the `action` keyword to specify jobs that prepare, start, or stop environmen
| **Value** | **Description** | | **Value** | **Description** |
|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| |-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| start | Default value. Indicates that job starts the environment. The deployment is created after the job starts. | | `start` | Default value. Indicates that job starts the environment. The deployment is created after the job starts. |
| prepare | Indicates that job is only preparing the environment. Does not affect deployments. [Read more about environments](../environments/index.md#prepare-an-environment) | | `prepare` | Indicates that the job is only preparing the environment. It does not trigger deployments. [Read more about preparing environments](../environments/index.md#prepare-an-environment-without-creating-a-deployment). |
| stop | Indicates that job stops deployment. See the example below. | | `stop` | Indicates that job stops deployment. See the example below. |
Take for instance: Take for instance:
......
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