Commit 90875684 authored by Max Woolf's avatar Max Woolf
Browse files

ci(rate_limit): attach redis service to base rspec job

The base rspec job from the common-ci-tasks/ruby-build component runs in
addition to our ruby-versions / legacy-ruby-versions matrix jobs, and was
failing because it had no redis service. Move the service + URL onto the
base rspec job so all three inherit it via `extends: rspec`, and drop the
duplicated blocks from the two matrix jobs.

Co-Authored-By: default avatarClaude Opus 4.7 (1M context) <noreply@anthropic.com>
parent c87eeb0b
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -27,14 +27,19 @@ include:

  - component: $CI_SERVER_FQDN/gitlab-com/gl-infra/common-ci-tasks/danger@v3.24

ruby-versions:
  extends: rspec
  image: ${CI_REGISTRY}/gitlab-com/gl-infra/common-ci-tasks-images/ruby:${RUBY_VERSION}
# Attach a redis service to the rspec job from common-ci-tasks/ruby-build.
# GitLab merges keys when a local job has the same name as an included one,
# so this augments the base job (and is inherited by anything that extends it).
rspec:
  services:
    - name: redis:7-alpine
      alias: redis
  variables:
    LABKIT_TEST_REDIS_URL: redis://redis

ruby-versions:
  extends: rspec
  image: ${CI_REGISTRY}/gitlab-com/gl-infra/common-ci-tasks-images/ruby:${RUBY_VERSION}
  parallel:
    matrix:
      - RUBY_VERSION: ["3.4"]
@@ -43,11 +48,6 @@ ruby-versions:
legacy-ruby-versions:
  extends: rspec
  image: ruby:${RUBY_VERSION}
  services:
    - name: redis:7-alpine
      alias: redis
  variables:
    LABKIT_TEST_REDIS_URL: redis://redis
  parallel:
    matrix:
      - RUBY_VERSION: ["3.3"]