summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-10-27 19:12:48 +0200
committerMatija Čupić <matteeyah@gmail.com>2018-10-27 19:12:48 +0200
commit3c2acb3acfcc95eead03403f6593201391ead8d2 (patch)
tree07fa142cd07480317756d97b4ba375db3445e783
parent9ba72fe09aaf3bf903494f09fe8896012e962c98 (diff)
downloadgitlab-ce-3c2acb3acfcc95eead03403f6593201391ead8d2.tar.gz
Add documentation entries
-rw-r--r--doc/ci/variables/README.md2
-rw-r--r--doc/ci/yaml/README.md26
2 files changed, 27 insertions, 1 deletions
diff --git a/doc/ci/variables/README.md b/doc/ci/variables/README.md
index 2d23bf6d2fd..0ddbc828d1a 100644
--- a/doc/ci/variables/README.md
+++ b/doc/ci/variables/README.md
@@ -65,6 +65,8 @@ future GitLab releases.**
| **CI_JOB_NAME** | 9.0 | 0.5 | The name of the job as defined in `.gitlab-ci.yml` |
| **CI_JOB_STAGE** | 9.0 | 0.5 | The name of the stage as defined in `.gitlab-ci.yml` |
| **CI_JOB_TOKEN** | 9.0 | 1.2 | Token used for authenticating with the [GitLab Container Registry][registry] and downloading [dependent repositories][dependent-repositories] |
+| **CI_NODE_INDEX** | 11.5 | all | The index of the job in the whole set. If the job is not paralellized, this is not set. |
+| **CI_NODE_TOTAL** | 11.5 | all | The total number of instances of this job running in parallel. If the job is not paralellized, this is set to 1. |
| **CI_JOB_URL** | 11.1 | 0.5 | Job details URL |
| **CI_REPOSITORY_URL** | 9.0 | all | The URL to clone the Git repository |
| **CI_RUNNER_DESCRIPTION** | 8.10 | 0.5 | The description of the runner as saved in GitLab |
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index 981aa101dd3..4801d5d42e7 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -75,6 +75,7 @@ A job is defined by a list of parameters that define the job behavior.
| environment | no | Defines a name of environment to which deployment is done by this job |
| coverage | no | Define code coverage settings for a given job |
| retry | no | Define how many times a job can be auto-retried in case of a failure |
+| parallel | no | Define how many duplicates of a job should be run in parallel |
### `extends`
@@ -1451,6 +1452,28 @@ test:
retry: 2
```
+## `parallel`
+
+> [Introduced][ce-22631] in GitLab 11.5.
+
+`parallel` allows you to configure how many duplicates of a job will be run in
+parallel. This value has to be greater or equal to two (2).
+
+This creates N duplicates of the same job that run in parallel. They're named
+sequentially from `job_name 1/N` to `job_name N/N`.
+
+For every job `CI_NODE_INDEX` and `CI_NODE_TOTAL` environment variables are set.
+`CI_NODE_TOTAL` represents the total number of jobs while `CI_NODE_INDEX` is the
+index of the job in the whole set.
+
+A simple example:
+
+```yaml
+test:
+ script: rspec
+ parallel: 5
+```
+
## `include`
> Introduced in [GitLab Edition Premium][ee] 10.5.
@@ -2031,7 +2054,8 @@ CI with various languages.
[ce-7983]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7983
[ce-7447]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7447
[ce-12909]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12909
+[ce-22631]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22631
[schedules]: ../../user/project/pipelines/schedules.md
[variables-expressions]: ../variables/README.md#variables-expressions
[ee]: https://about.gitlab.com/gitlab-ee/
-[gitlab-versions]: https://about.gitlab.com/products/ \ No newline at end of file
+[gitlab-versions]: https://about.gitlab.com/products/