blob: 46c5e1342c6f5643aa3322d0ee206e00c14d5600 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# The template generates jobs that trigger child pipelines for gems vendored in the main GitLab project under `gems/`.
#
# Inputs:
# - `gem_name`: The name of the gem, i.e. if the gem is located at `gems/gitlab-rspec`, `gem_name` should be set to `gitlab-rspec`.
# - `gem_path_prefix`: The prefix of the gem path, i.e. if the gem is located at `vendor/gems/gitlab-rspec`, `gem_path_prefix` should be set to `vendor/gems/`. Defaults to `gems/`.
spec:
inputs:
gem_name:
gem_path_prefix:
default: "gems/"
---
.gems:rules:$[[inputs.gem_name]]:
rules:
- if: '$CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached"'
changes:
- "$[[inputs.gem_path_prefix]]$[[inputs.gem_name]]/**/*"
- ".gitlab/ci/gitlab-gems.gitlab-ci.yml"
- ".gitlab/ci/templates/gem.gitlab-ci.yml"
- "gems/gem.gitlab-ci.yml"
gems $[[inputs.gem_name]]:
extends: ".gems:rules:$[[inputs.gem_name]]"
needs: []
trigger:
include: "$[[inputs.gem_path_prefix]]$[[inputs.gem_name]]/.gitlab-ci.yml"
strategy: depend
inherit:
variables: false
|