gitlab-labkit 0.37.0 → 0.38.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc40f1e37b87feea515d17caacf51c043e334fdd2cb2ae12689425dac2c2abaa
4
- data.tar.gz: 872361b6e95fbd14768ed454afd9ab5aeff18136d62ac7e46d0b636a2ea7877d
3
+ metadata.gz: 051d4550346adc1ae0b8005b78df53a3b6e8cfce64a73fa91215233ba36f21d7
4
+ data.tar.gz: 95bd6e3f4676786d6c3232fedb6aa00dac9a884681c79143e019d03f0579f791
5
5
  SHA512:
6
- metadata.gz: b75ee05daa1bcfe02e939a7573326c3850ce412b5b753fee6b6139ca323329def13d94a603651a58150e1905fd0c6a9cb6004f6c24190302bb34d9a9d06c1bbc
7
- data.tar.gz: 0bc7e7d9f5d877626691418da58d7ba4c660cd09533d44c0d6295a8edefb40f193ddfe865e10b434b266a6be42cfed10d6953f273b3a5bae0663c411e7ccda94
6
+ metadata.gz: 691bf309d92f406946df0df5e2a4adf84a1f38907d0b331e365ee4d93748c01f2b373425afb4d22c71e916a365a26e40340c6acecdef9d5e725bcf9be3c2fd91
7
+ data.tar.gz: 9eead31a310777d6eb2e3149224b12ecfd1efc77eaa56a241b4991de3a9fa8f8a8c74c2c7e8a9b5efd16f2a47b495fc8ecb20949fc248394ae6c58dad24cc023
@@ -0,0 +1,15 @@
1
+ # This project was initially generated with
2
+ # https://gitlab.com/gitlab-com/gl-infra/common-template-copier
3
+ # See the project for instructions on how to update the project
4
+ #
5
+ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
6
+ _commit: v1.31.0
7
+ _src_path: https://gitlab.com/gitlab-com/gl-infra/common-template-copier.git
8
+ ee_licensed: false
9
+ golang: false
10
+ initial_codeowners: '@reprazent @andrewn @mkaeppler @ayufan'
11
+ jsonnet: false
12
+ project_name: labkit-ruby
13
+ ruby: true
14
+ rubygem: true
15
+ terraform: false
data/.editorconfig ADDED
@@ -0,0 +1,28 @@
1
+ # EditorConfig is awesome: https://EditorConfig.org
2
+
3
+ # top-most EditorConfig file
4
+ root = true
5
+
6
+ # Unix-style newlines with a newline ending every file
7
+ [*]
8
+ charset = utf-8
9
+ end_of_line = lf
10
+ indent_size = 2
11
+ indent_style = space
12
+ insert_final_newline = true
13
+ insert_final_newline = true
14
+ trim_trailing_whitespace = true
15
+
16
+ [.copier-*.yml]
17
+ insert_final_newline = unset
18
+ indent_size = unset
19
+
20
+ [*.md]
21
+ indent_size = unset
22
+
23
+ [{Makefile,**.mk}]
24
+ # Use tabs for indentation (Makefiles require tabs)
25
+ indent_style = tab
26
+
27
+ [*.rego]
28
+ indent_style = tab
@@ -0,0 +1,5 @@
1
+ # DO NOT MANUALLY EDIT; Run ./scripts/update-asdf-version-variables.sh to update this
2
+ variables:
3
+ GL_ASDF_RUBY_VERSION: "3.4.4"
4
+ GL_ASDF_SHELLCHECK_VERSION: "0.10.0"
5
+ GL_ASDF_SHFMT_VERSION: "3.11.0"
data/.gitlab-ci.yml CHANGED
@@ -1,57 +1,58 @@
1
- variables:
2
- RUBY_VERSION: "3.1.5"
3
-
4
- default:
5
- image: "ruby:${RUBY_VERSION}"
1
+ stages:
2
+ - validate
3
+ - release
4
+ - renovate_bot
6
5
 
6
+ # Prevent double-pipelines for branch pipelines vs. merge request pipelines
7
7
  workflow:
8
8
  rules:
9
- # For merge requests, create a pipeline.
10
- - if: '$CI_MERGE_REQUEST_IID'
11
- # For `master` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
12
- - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
13
- # For tags, create a pipeline.
14
- - if: '$CI_COMMIT_TAG'
9
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
10
+ - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
11
+ when: never
12
+ - if: $CI_COMMIT_BRANCH
13
+ - if: $CI_COMMIT_TAG
15
14
 
16
15
  include:
17
- - component: ${CI_SERVER_FQDN}/gitlab-org/components/danger-review/danger-review@1.4.1
18
- inputs:
19
- job_image: "ruby:${RUBY_VERSION}"
16
+ - local: .gitlab-ci-asdf-versions.yml
17
+
18
+ # This template should be included in all Infrastructure projects.
19
+ # It includes standard checks, gitlab-scanners, validations and release processes
20
+ # common to all projects using this template library.
21
+ # see https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/templates/standard.md
22
+ - project: "gitlab-com/gl-infra/common-ci-tasks"
23
+ ref: v2.77 # renovate:managed
24
+ file: templates/standard.yml
25
+
26
+ # Runs rspec tests and rubocop on the project
27
+ # see https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/templates/ruby.md
28
+ - project: "gitlab-com/gl-infra/common-ci-tasks"
29
+ ref: v2.77 # renovate:managed
30
+ file: templates/ruby.yml
31
+
32
+ - project: "gitlab-com/gl-infra/common-ci-tasks"
33
+ ref: v2.77 # renovate:managed
34
+ file: "danger.yml"
20
35
 
21
36
  .test_template: &test_definition
37
+ extends: .with_bundle
22
38
  image: ruby:${RUBY_VERSION}
23
- stage: test
39
+ stage: validate
24
40
  script:
25
41
  - gem install bundler --no-document
26
42
  - bundle config --local path vendor
27
43
  - bundle install
28
44
  - bundle exec rake verify build install
29
- cache:
30
- key: ${CI_JOB_IMAGE}
31
- paths:
32
- - vendor/ruby
33
- ruby:
45
+
46
+ ruby-versions:
34
47
  <<: *test_definition
35
48
  parallel:
36
49
  matrix:
37
- - RUBY_VERSION: ["3.0", "3.1", "3.2"]
38
-
39
- static-analysis:
40
- before_script:
41
- - bundle install
42
- script:
43
- - rake verify
50
+ - RUBY_VERSION: ["3.2", "3.3"]
44
51
 
45
52
  deploy:
46
- stage: deploy
53
+ rules:
54
+ - if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+/
55
+ extends: .with_bundle
56
+ stage: release
47
57
  script:
48
58
  - tools/deploy-rubygem.sh
49
- only:
50
- - tags
51
-
52
- release:
53
- stage: deploy
54
- script:
55
- - tools/update-changelog.rb "${CI_COMMIT_TAG}"
56
- only:
57
- - tags
data/.gitleaks.toml ADDED
@@ -0,0 +1,10 @@
1
+ title = "project-scoped gitleaks config"
2
+
3
+ [extend]
4
+ # useDefault will extend the base configuration with the default gitleaks config:
5
+ # https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml
6
+ useDefault = true
7
+
8
+ # See https://github.com/zricethezav/gitleaks#configuration
9
+ # for details of extending this configuration for allowlists,
10
+ # etc
data/.mise.toml ADDED
@@ -0,0 +1,8 @@
1
+ [settings]
2
+ legacy_version_file = false
3
+
4
+ [tools]
5
+ # Please continue to use `.tool-versions` to specify tool versions, rather than adding them directly here.
6
+
7
+ [plugins]
8
+ # Use this section to configure the source of any custom mise/asdf plugin
@@ -0,0 +1,38 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ ---
4
+ # Use exclude to exclude specific files
5
+ # exclude: '^fixtures/'
6
+ repos:
7
+ - repo: https://github.com/pre-commit/pre-commit-hooks
8
+ rev: v5.0.0 # renovate:managed
9
+ hooks:
10
+ - id: trailing-whitespace
11
+ - id: end-of-file-fixer
12
+ - id: check-yaml
13
+ - id: check-case-conflict
14
+ - id: check-symlinks
15
+ - id: check-json
16
+ - id: detect-private-key
17
+ - id: mixed-line-ending
18
+ args: ["--fix=lf"]
19
+ - id: no-commit-to-branch
20
+ args: [--branch, main]
21
+ - id: pretty-format-json
22
+ args: [--autofix, --no-sort-keys]
23
+
24
+ # pre-commit tasks from common-ci-tasks
25
+ # Documentation available at
26
+ # https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks/-/blob/main/docs/pre-commit.md
27
+ - repo: https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks
28
+ rev: v2.77 # renovate:managed
29
+
30
+ hooks:
31
+ - id: shellcheck # Run shellcheck for changed Shell files
32
+ - id: shfmt # Run shellcheck for changed Shell files
33
+ - id: update-asdf-version-variables # Update .gitlab-ci-asdf-versions.yml if .tool-versions has changed
34
+
35
+ # - id: gitlint # Checks your git commit messages for style
36
+ - id: gitleaks # Detect hardcoded secrets using Gitleaks
37
+ - id: editorconfig # Validate text files against .editorconfig
38
+ - id: yamllint # Validate YAML files using yamllint
data/.releaserc.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "branches": ["master"],
3
+ "plugins": [
4
+ [
5
+ "@semantic-release/commit-analyzer",
6
+ {
7
+ "preset": "conventionalcommits"
8
+ }
9
+ ],
10
+ [
11
+ "@semantic-release/release-notes-generator",
12
+ {
13
+ "preset": "conventionalcommits"
14
+ }
15
+ ],
16
+ "@gitlab/truncated-tags",
17
+ "@semantic-release/gitlab"
18
+ ]
19
+ }
data/.rubocop.yml CHANGED
@@ -5,61 +5,4 @@ inherit_gem:
5
5
  - rubocop-default.yml
6
6
 
7
7
  AllCops:
8
- TargetRubyVersion: 2.7
9
-
10
- Style/HashSyntax:
11
- EnforcedStyle: no_mixed_keys
12
-
13
- Style/SymbolLiteral:
14
- Enabled: No
15
-
16
- Style/TrailingCommaInArguments:
17
- Enabled: No # Delegated to rufo
18
-
19
- Style/TrailingCommaInHashLiteral:
20
- Enabled: No # Delegated to rufo
21
-
22
- Style/FrozenStringLiteralComment:
23
- EnforcedStyle: always
24
-
25
- Style/TrailingCommaInArrayLiteral:
26
- EnforcedStyleForMultiline: comma
27
-
28
- Style/StringLiterals:
29
- EnforcedStyle: double_quotes
30
-
31
- Style/StringLiteralsInInterpolation:
32
- EnforcedStyle: double_quotes
33
-
34
- Style/Lambda:
35
- Enabled: false
36
-
37
- Layout/LineLength:
38
- Enabled: false
39
-
40
- Layout/SpaceInLambdaLiteral:
41
- Enabled: No
42
-
43
- Layout/SpaceInsideBlockBraces:
44
- Enabled: No
45
-
46
- Layout/FirstParameterIndentation:
47
- Enabled: No
48
-
49
- RSpec/ExampleWording:
50
- Enabled: false
51
- CustomTransform:
52
- be: is
53
- have: has
54
- not: does not
55
- IgnoredWords: []
56
-
57
- Lint/HashCompareByIdentity: # (new in 0.93)
58
- Enabled: true
59
- Lint/RedundantSafeNavigation: # (new in 0.93)
60
- Enabled: true
61
- Style/ClassEqualityComparison: # (new in 0.93)
62
- Enabled: true
63
-
64
- CodeReuse/ActiveRecord:
65
- Enabled: false
8
+ NewCops: enable