ci

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 2 Imported by: 0

README

GitLab Styles CI/CD Pipeline

This is GitLab Styles' CI/CD pipeline, imported from gitlab-org/gitlab-styles.

Overview

GitLab Styles is a collection of custom RuboCop cops and configurations for GitLab projects. This pipeline demonstrates Ruby gem testing and publishing.

Pipeline Characteristics

  • Project ID: 4176070
  • Lines of Code: ~63 lines
  • Language: Ruby
  • Features Demonstrated:
    • RuboCop testing
    • Ruby gem packaging
    • Multi-version Ruby testing
    • Gem publishing
    • Code style enforcement

Key Features

RuboCop Testing

Demonstrates testing RuboCop custom cops and configurations.

Multi-Ruby Version Testing

Tests across multiple Ruby versions for compatibility.

Gem Publishing Pipeline

Automated gem building and publishing to RubyGems.

Style Enforcement

Shows best practices for maintaining code style standards.

What You Can Learn

  1. Ruby gem CI/CD - Testing and publishing Ruby gems
  2. RuboCop development - Creating custom cops
  3. Multi-version testing - Supporting multiple Ruby versions
  4. Code style automation - Enforcing style standards

Source

Building This Example

cat pipeline.go
mkdir my-styles-pipeline && cp pipeline.go my-styles-pipeline/
cd my-styles-pipeline && go mod init example/my-styles-pipeline && go mod tidy

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GemnasiumDependencyScanning = pipeline.Job{
	Name: "gemnasium-dependency_scanning",
	Rules: List(
		pipeline.Rule{
			If: "$CI_MERGE_REQUEST_IID",
		},
		pipeline.Rule{
			If: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH",
		},
	),
}
View Source
var MainPipeline = pipeline.Pipeline{
	Stages: List("test", "deploy"),
}
View Source
var SecretDetection = pipeline.Job{
	Name: "secret_detection",
	Rules: List(
		pipeline.Rule{
			If: "$CI_MERGE_REQUEST_IID",
		},
		pipeline.Rule{
			If: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH",
		},
	),
}
View Source
var SemgrepSast = pipeline.Job{
	Name: "semgrep-sast",
	Rules: List(
		pipeline.Rule{
			If: "$CI_MERGE_REQUEST_IID",
		},
		pipeline.Rule{
			If: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH",
		},
	),
}
View Source
var Specs = pipeline.Job{
	Name:   "specs",
	Stage:  "test",
	Script: List("if [[ \"$RUBY_VERSION\" != \"3.1\" ]]; then export SIMPLECOV=0; fi", "bundle exec rspec"),
	Artifacts: pipeline.Artifacts{
		Paths:    List("coverage/index.html", "coverage/assets/"),
		ExpireIn: "31d",
		Name:     "coverage",
	},
}
View Source
var Styles = pipeline.Job{
	Name:   "styles",
	Stage:  "test",
	Script: List("bundle exec rubocop --debug --parallel"),
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL