Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ci/jobs/index.md')
-rw-r--r--doc/ci/jobs/index.md26
1 files changed, 25 insertions, 1 deletions
diff --git a/doc/ci/jobs/index.md b/doc/ci/jobs/index.md
index 3fe30c78d6a..aa12e1181cb 100644
--- a/doc/ci/jobs/index.md
+++ b/doc/ci/jobs/index.md
@@ -168,7 +168,7 @@ for a single run of the manual job.
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/21767) in GitLab 11.4.
-When you do not want to run a job immediately, you can use the [`when:delayed`](../yaml/index.md#whendelayed) keyword to
+When you do not want to run a job immediately, you can use the [`when:delayed`](../jobs/job_control.md#run-a-job-after-a-delay) keyword to
delay a job's execution for a certain period.
This is especially useful for timed incremental rollout where new code is rolled out gradually.
@@ -259,3 +259,27 @@ job1:
- echo 'this line should be hidden automatically after loading the job log'
- echo -e "\e[0Ksection_end:`date +%s`:my_first_section\r\e[0K"
```
+
+## Deployment jobs
+
+Deployment jobs are a specific kind of CI job in that they deploy code to
+[environments](../environments/index.md). A deployment job is any job that
+uses the `environment` keyword and the [`start` environment `action`](../yaml/index.md#environmentaction).
+Deployment jobs do not need to be in the `deploy` stage. The following `deploy me`
+job is an example of a deployment job. `action: start` is the default behavior and
+is defined for the sake of the example, but you can omit it:
+
+```yaml
+deploy me:
+ script:
+ - deploy-to-cats.sh
+ environment:
+ name: production
+ url: https://cats.example.com
+ action: start
+```
+
+The behavior of deployment jobs can be controlled with
+[deployment safety](../environments/deployment_safety.md) settings like
+[skipping outdated deployment jobs](../environments/deployment_safety.md#prevent-deployments-during-deploy-freeze-windows)
+and [ensuring only one deployment job runs at a time](../environments/deployment_safety.md#ensure-only-one-deployment-job-runs-at-a-time).