gitlab

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitLabJob

type GitLabJob struct {
	Image         interface{}              `yaml:"image,omitempty"`
	Stage         string                   `yaml:"stage,omitempty"`
	Script        []string                 `yaml:"script,omitempty"`
	BeforeScript  []string                 `yaml:"before_script,omitempty"`
	AfterScript   []string                 `yaml:"after_script,omitempty"`
	Variables     map[string]string        `yaml:"variables,omitempty"`
	Cache         interface{}              `yaml:"cache,omitempty"`
	Artifacts     interface{}              `yaml:"artifacts,omitempty"`
	Dependencies  []string                 `yaml:"dependencies,omitempty"`
	Needs         []interface{}            `yaml:"needs,omitempty"`
	Rules         []map[string]interface{} `yaml:"rules,omitempty"`
	Only          interface{}              `yaml:"only,omitempty"`
	Except        interface{}              `yaml:"except,omitempty"`
	When          string                   `yaml:"when,omitempty"`
	AllowFailure  bool                     `yaml:"allow_failure,omitempty"`
	Timeout       string                   `yaml:"timeout,omitempty"`
	Retry         interface{}              `yaml:"retry,omitempty"`
	Parallel      interface{}              `yaml:"parallel,omitempty"`
	Tags          []string                 `yaml:"tags,omitempty"`
	Services      []interface{}            `yaml:"services,omitempty"`
	Environment   interface{}              `yaml:"environment,omitempty"`
	Coverage      string                   `yaml:"coverage,omitempty"`
	Release       interface{}              `yaml:"release,omitempty"`
	Trigger       interface{}              `yaml:"trigger,omitempty"`
	Inherit       interface{}              `yaml:"inherit,omitempty"`
	Extends       interface{}              `yaml:"extends,omitempty"`
	ResourceGroup string                   `yaml:"resource_group,omitempty"`
}

type GitLabPlatform

type GitLabPlatform struct{}

GitLabPlatform implements the Platform interface for GitLab CI

func NewGitLabPlatform

func NewGitLabPlatform() *GitLabPlatform

NewGitLabPlatform creates a new GitLab CI platform implementation

func (*GitLabPlatform) DetectWorkflows

func (glp *GitLabPlatform) DetectWorkflows(rootPath string) ([]string, error)

DetectWorkflows finds GitLab CI workflow files

func (*GitLabPlatform) GetSecurityContext

func (glp *GitLabPlatform) GetSecurityContext(workflow *platform.Workflow) *platform.SecurityContext

GetSecurityContext extracts security-relevant information from a GitLab CI workflow

func (*GitLabPlatform) Name

func (glp *GitLabPlatform) Name() string

Name returns the platform name

func (*GitLabPlatform) ParseWorkflow

func (glp *GitLabPlatform) ParseWorkflow(path string) (*platform.Workflow, error)

ParseWorkflow parses a GitLab CI workflow file

func (*GitLabPlatform) ValidateWorkflow

func (glp *GitLabPlatform) ValidateWorkflow(workflow *platform.Workflow) error

ValidateWorkflow validates a GitLab CI workflow

type GitLabWorkflow

type GitLabWorkflow struct {
	Workflow     GitLabWorkflowConfig `yaml:"workflow,omitempty"`
	Image        interface{}          `yaml:"image,omitempty"`
	Services     []interface{}        `yaml:"services,omitempty"`
	Stages       []string             `yaml:"stages,omitempty"`
	Variables    map[string]string    `yaml:"variables,omitempty"`
	BeforeScript []string             `yaml:"before_script,omitempty"`
	AfterScript  []string             `yaml:"after_script,omitempty"`
	Cache        interface{}          `yaml:"cache,omitempty"`
	Artifacts    interface{}          `yaml:"artifacts,omitempty"`
	Include      []interface{}        `yaml:"include,omitempty"`
	Jobs         map[string]GitLabJob `yaml:",inline"`
}

GitLab CI specific structures

type GitLabWorkflowConfig

type GitLabWorkflowConfig struct {
	Name  string                   `yaml:"name,omitempty"`
	Rules []map[string]interface{} `yaml:"rules,omitempty"`
}

Jump to

Keyboard shortcuts

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