Sha256: 75cd53ecbc7ed04c9e40e1fc794ccf8ec04926b07821a13da5d685e37b59f8bb

Contents?: true

Size: 1.7 KB

Versions: 1

Compression:

Stored size: 1.7 KB

Contents

stages:
  - test
  - deploy

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:
  tags:
    - gitlab-org
  cache:
    key:
      files:
        - Gemfile
        - gitlab-dangerfiles.gemspec
    paths:
      - vendor/ruby

.default-test-job:
  image: "ruby:${RUBY_VERSION}"
  stage: test
  needs: []
  before_script:
    - gem install bundler
    - bundle install -j $(nproc) --path vendor
  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:
  - component: gitlab.com/components/sast/sast@~latest
  - component: gitlab.com/components/secret-detection/secret-detection@~latest
  - component: gitlab.com/gitlab-org/components/gem-release/gem-release@~latest
    inputs:
      smoke_test_script: "ruby -r 'gitlab-dangerfiles' -e \"puts Gitlab::Dangerfiles::VERSION\""
  - component: gitlab.com/gitlab-org/components/danger-review/danger-review@~latest
    inputs:
      dry_run: true
  - template: Security/Dependency-Scanning.gitlab-ci.yml

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

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

1 entries across 1 versions & 1 rubygems

Version Path
gitlab-dangerfiles-4.8.0 .gitlab-ci.yml