differ

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package differ provides semantic comparison of GitLab CI pipelines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Stage        string            `yaml:"stage"`
	Image        interface{}       `yaml:"image"`
	Services     []interface{}     `yaml:"services"`
	Script       []string          `yaml:"script"`
	BeforeScript []string          `yaml:"before_script"`
	AfterScript  []string          `yaml:"after_script"`
	Variables    map[string]string `yaml:"variables"`
	Rules        []interface{}     `yaml:"rules"`
	Only         interface{}       `yaml:"only"`
	Except       interface{}       `yaml:"except"`
	Needs        interface{}       `yaml:"needs"`
	Dependencies []string          `yaml:"dependencies"`
	Artifacts    interface{}       `yaml:"artifacts"`
	Cache        interface{}       `yaml:"cache"`
	Tags         []string          `yaml:"tags"`
	Environment  interface{}       `yaml:"environment"`
	Retry        interface{}       `yaml:"retry"`
	Timeout      string            `yaml:"timeout"`
	Parallel     interface{}       `yaml:"parallel"`
	AllowFailure interface{}       `yaml:"allow_failure"`
	When         string            `yaml:"when"`
	Extends      interface{}       `yaml:"extends"`
}

Job represents a GitLab CI job.

type JobDefaults

type JobDefaults struct {
	Image         interface{}   `yaml:"image"`
	Services      []interface{} `yaml:"services"`
	BeforeScript  []string      `yaml:"before_script"`
	AfterScript   []string      `yaml:"after_script"`
	Tags          []string      `yaml:"tags"`
	Cache         interface{}   `yaml:"cache"`
	Artifacts     interface{}   `yaml:"artifacts"`
	Retry         interface{}   `yaml:"retry"`
	Timeout       string        `yaml:"timeout"`
	Interruptible bool          `yaml:"interruptible"`
}

JobDefaults represents default job settings.

type Pipeline

type Pipeline struct {
	Stages    []string          `yaml:"stages"`
	Variables map[string]string `yaml:"variables"`
	Default   *JobDefaults      `yaml:"default"`
	Workflow  interface{}       `yaml:"workflow"`
	Include   interface{}       `yaml:"include"`
	Jobs      map[string]Job    `yaml:"-"` // Populated from non-keyword keys
	// contains filtered or unexported fields
}

Pipeline represents a GitLab CI pipeline.

type PipelineDiffer

type PipelineDiffer struct{}

PipelineDiffer implements coredomain.Differ for GitLab CI pipelines.

func New

func New() *PipelineDiffer

New creates a new pipeline differ.

func (*PipelineDiffer) Diff

func (d *PipelineDiffer) Diff(ctx *coredomain.Context, file1, file2 string, opts coredomain.DiffOpts) (*coredomain.DiffResult, error)

Diff compares two GitLab CI pipeline files and returns differences.

Jump to

Keyboard shortcuts

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