Sha256: cc55e0c7ddd5f449ffe52f1e1b6b4a161bec6f08b34526db7ec6e54779d5473b

Contents?: true

Size: 1.84 KB

Versions: 2

Compression:

Stored size: 1.84 KB

Contents

stages:
  - test
  - deploy

variables:
  DEFAULT_CI_IMAGE: "ruby:${RUBY_VERSION}"

workflow:
  rules:
    # For merge requests, create a pipeline.
    - if: '$CI_MERGE_REQUEST_IID'
    # For `master` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
    # For tags, create a pipeline.
    - if: '$CI_COMMIT_TAG'

default:
  image: "${DEFAULT_CI_IMAGE}"
  tags:
    - gitlab-org
  before_script:
    - gem install bundler
    - bundle install -j $(nproc) --path vendor
  cache:
    key:
      files:
        - Gemfile
        - gitlab-dangerfiles.gemspec
    paths:
      - vendor/ruby
      - Gemfile.lock
    policy: pull

.default-test-job:
  stage: test
  needs: []
  parallel:
    matrix:
      - RUBY_VERSION: ['3.0', '3.1', '3.2']

test:rspec:
  extends: .default-test-job
  script:
    - bundle exec rspec

test:rubocop:
  extends: .default-test-job
  script:
    - bundle exec rubocop -P -E .

include:
  - template: Security/Dependency-Scanning.gitlab-ci.yml
  - template: Security/SAST.gitlab-ci.yml
  - template: Security/Secret-Detection.gitlab-ci.yml
  - project: 'gitlab-org/quality/pipeline-common'
    file:
      - '/ci/danger-review.yml'
  - component: "gitlab.com/gitlab-org/quality/pipeline-common/gem-release@7.6.1"
    inputs:
      smoke_test_script: "ruby -r 'gitlab-dangerfiles' -e \"puts Gitlab::Dangerfiles::VERSION\""

# run security jobs on MRs
# see: https://gitlab.com/gitlab-org/gitlab/-/issues/218444#note_478761991

brakeman-sast:
  rules:
    - if: '$CI_MERGE_REQUEST_IID'
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'

gemnasium-dependency_scanning:
  rules:
    - if: '$CI_MERGE_REQUEST_IID'
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'

secret_detection:
  rules:
    - if: '$CI_MERGE_REQUEST_IID'
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gitlab-dangerfiles-4.6.0 .gitlab-ci.yml
gitlab-dangerfiles-4.5.1 .gitlab-ci.yml