Commit 5af32e88 authored by Andrew Newdigate's avatar Andrew Newdigate
Browse files

Merge branch 'bvl/onboard-common-ci-tasks' into 'master'

chore: start using common-ci-tasks

See merge request !137

Merged-by: Andrew Newdigate's avatarAndrew Newdigate <andrew@gitlab.com>
Approved-by: Andrew Newdigate's avatarAndrew Newdigate <andrew@gitlab.com>
Co-authored-by: Bob Van Landuyt's avatarBob Van Landuyt <bob@gitlab.com>
parents fa856b12 4f664bb8
Loading
Loading
Loading
Loading
Loading

.copier-answers.yml

0 → 100644
+15 −0
Original line number Diff line number Diff line
# This project was initially generated with
# https://gitlab.com/gitlab-com/gl-infra/common-template-copier
# See the project for instructions on how to update the project
#
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v1.31.0
_src_path: https://gitlab.com/gitlab-com/gl-infra/common-template-copier.git
ee_licensed: false
golang: false
initial_codeowners: '@reprazent @andrewn @mkaeppler @ayufan'
jsonnet: false
project_name: labkit-ruby
ruby: true
rubygem: true
terraform: false

.editorconfig

0 → 100644
+28 −0
Original line number Diff line number Diff line
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
insert_final_newline = true
trim_trailing_whitespace = true

[.copier-*.yml]
insert_final_newline = unset
indent_size = unset

[*.md]
indent_size = unset

[{Makefile,**.mk}]
# Use tabs for indentation (Makefiles require tabs)
indent_style = tab

[*.rego]
indent_style = tab
+5 −0
Original line number Diff line number Diff line
# DO NOT MANUALLY EDIT; Run ./scripts/update-asdf-version-variables.sh to update this
variables:
    GL_ASDF_RUBY_VERSION: "3.4.3"
    GL_ASDF_SHELLCHECK_VERSION: "0.10.0"
    GL_ASDF_SHFMT_VERSION: "3.11.0"
+35 −28
Original line number Diff line number Diff line
variables:
  RUBY_VERSION: "3.2.6"

default:
  image: "ruby:${RUBY_VERSION}"
stages:
  - validate
  - release
  - renovate_bot

# Prevent double-pipelines for branch pipelines vs. merge request pipelines
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'
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
    - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
      when: never
    - if: $CI_COMMIT_BRANCH
    - if: $CI_COMMIT_TAG

include:
  - component: ${CI_SERVER_FQDN}/gitlab-org/components/danger-review/danger-review@1.4.1
    inputs:
      job_image: "ruby:${RUBY_VERSION}"
  - local: .gitlab-ci-asdf-versions.yml

  # This template should be included in all Infrastructure projects.
  # It includes standard checks, gitlab-scanners, validations and release processes
  # common to all projects using this template library.
  # see https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/templates/standard.md
  - project: "gitlab-com/gl-infra/common-ci-tasks"
    ref: v2.73  # renovate:managed
    file: templates/standard.yml

  # Runs rspec tests and rubocop on the project
  # see https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/templates/ruby.md
  - project: 'gitlab-com/gl-infra/common-ci-tasks'
    ref: v2.73  # renovate:managed
    file: templates/ruby.yml

  - project: 'gitlab-com/gl-infra/common-ci-tasks'
    ref: v2.73  # renovate:managed
    file: 'danger.yml'

.test_template: &test_definition
  extends: .with_bundle
  image: ruby:${RUBY_VERSION}
  stage: test
  stage: validate
  script:
    - gem install bundler --no-document
    - bundle config --local path vendor
    - bundle install
    - bundle exec rake verify build install
  cache:
    key: ${CI_JOB_IMAGE}
    paths:
      - vendor/ruby
ruby:

ruby-versions:
  <<: *test_definition
  parallel:
    matrix:
      - RUBY_VERSION: ["3.2", "3.3"]

static-analysis:
  before_script:
    - bundle install
  script:
    - bundle exec rubocop -P

deploy:
  stage: deploy
  stage: release
  script:
    - tools/deploy-rubygem.sh
  only:
    - tags

release:
  stage: deploy
  stage: release
  script:
    - tools/update-changelog.rb "${CI_COMMIT_TAG}"
  only:

.gitleaks.toml

0 → 100644
+10 −0
Original line number Diff line number Diff line
title = "project-scoped gitleaks config"

[extend]
# useDefault will extend the base configuration with the default gitleaks config:
# https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml
useDefault = true

# See https://github.com/zricethezav/gitleaks#configuration
# for details of extending this configuration for allowlists,
# etc
Loading