Commit 4f6d4f8d authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'specify-ruby-image-in-fail-fast-template' into 'master'

Specify Ruby image in FailFast template

See merge request gitlab-org/gitlab!38523
parents 70fbb3d4 cec98d09
---
title: Specify Ruby image in FailFast template
merge_request: 38523
author:
type: changed
......@@ -45,8 +45,9 @@ This template requires:
- Use [Pipelines for Merge Requests](../../../ci/merge_request_pipelines/index.md#configuring-pipelines-for-merge-requests)
- [Pipelines for Merged Results](../../../ci/merge_request_pipelines/pipelines_for_merged_results/index.md#enable-pipelines-for-merged-results)
enabled in the project settings.
- A Docker image with Ruby available. The template uses `image: ruby:2.6` by default, but you [can override](../../../ci/yaml/includes.md#overriding-external-template-values) this.
## Configure Fast RSpec Failure
## Configuring Fast RSpec Failure
We'll use the following plain RSpec configuration as a starting point. It installs all the
project gems and executes `rspec`, on merge request pipelines only.
......@@ -69,6 +70,16 @@ include:
- template: Verify/FailFast.gitlab-ci.yml
```
To customize the job, specific options may be set to override the template. For example, to override the default Docker image:
```yaml
include:
- template: Verify/FailFast.gitlab-ci.yml
rspec-rails-modified-path-specs:
image: custom-docker-image-with-ruby
```
### Example test loads
For illustrative purposes, let's say our Rails app spec suite consists of 100 specs per model for ten models.
......
rspec-rails-modified-path-specs:
image: ruby:2.6
stage: .pre
rules:
- if: $CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "merge_train"
......
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