Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gem.gitlab-ci.yml « templates « ci « .gitlab - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f17e168c1af6ec38aa071c221de2a10025bedb57 (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
29
30
31
32
33
34
35
# 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_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "maintenance"'
    - 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/vendored-gems.gitlab-ci.yml"
        - ".gitlab/ci/templates/gem.gitlab-ci.yml"
        - "gems/gem.gitlab-ci.yml"
        # Ensure new cop in the monolith don't break internal gems Rubocop checks: https://gitlab.com/gitlab-org/gitlab/-/issues/419915
        - ".rubocop.yml"
        - "rubocop/**/*"
        - ".rubocop_todo/**/*"


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