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
path: root/doc/ci/jobs
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-30 18:10:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-30 18:10:25 +0300
commit0daaf2c2ba5a0537094a53e7f84386616dbcbff0 (patch)
treef7c1bf45ac2b19d7dafdc4c4b541e862d4ddc886 /doc/ci/jobs
parentb51258eac273fa8aad9ec7d8a2888b9fd747b107 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/ci/jobs')
-rw-r--r--doc/ci/jobs/index.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/ci/jobs/index.md b/doc/ci/jobs/index.md
index 3fe30c78d6a..0ed8b68c0ce 100644
--- a/doc/ci/jobs/index.md
+++ b/doc/ci/jobs/index.md
@@ -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).