summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrew <dscimino@gmail.com>2019-07-31 00:11:17 +0000
committerEvan Read <eread@gitlab.com>2019-07-31 00:11:17 +0000
commitafa73f4d4e8b1e8106997f4eb11d82b31164fe48 (patch)
treef5ea25f582de2fe43f007ba6a18bd5afac5c3b12
parent0b975947462b32ff804688c2ee3e77d06812ab0a (diff)
downloadgitlab-ce-afa73f4d4e8b1e8106997f4eb11d82b31164fe48.tar.gz
Documentation: Added Semaphore Test Boosters example to CI YAML `parallel` docs
-rw-r--r--doc/ci/yaml/README.md35
1 files changed, 29 insertions, 6 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index 09b9fc87986..201047b70b9 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -1771,18 +1771,41 @@ sequentially from `job_name 1/N` to `job_name N/N`.
For every job, `CI_NODE_INDEX` and `CI_NODE_TOTAL` [environment variables](../variables/README.md#predefined-environment-variables) are set.
-A simple example:
+Marking a job to be run in parallel requires only a simple addition to your configuration file:
-```yaml
-test:
- script: rspec
- parallel: 5
+```diff
+ test:
+ script: rspec
++ parallel: 5
```
-
TIP: **Tip:**
Parallelize tests suites across parallel jobs.
Different languages have different tools to facilitate this.
+A simple example using [Sempahore Test Boosters](https://github.com/renderedtext/test-boosters) and RSpec to run some Ruby tests:
+
+```ruby
+# Gemfile
+source 'https://rubygems.org'
+
+gem 'rspec'
+gem 'semaphore_test_boosters'
+```
+
+```yaml
+test:
+ parallel: 3
+ script:
+ - bundle
+ - bundle exec rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL
+```
+
+CAUTION: **Caution:**
+Please be aware that semaphore_test_boosters reports usages statistics to the author.
+
+You can then navigate to the **Jobs** tab of a new pipeline build and see your RSpec
+job split into three separate jobs.
+
### `trigger` **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/8997) in [GitLab Premium](https://about.gitlab.com/pricing/) 11.8.