models

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifacts

type Artifacts struct {
	Exclude   []string `yaml:"exclude,omitempty"`
	ExpireIn  string   `yaml:"expire_in,omitempty"`
	ExposeAs  string   `yaml:"expose_as,omitempty"`
	Name      string   `yaml:"name,omitempty"`
	Paths     []string `yaml:"paths,omitempty"`
	Reports   *Reports `yaml:"reports,omitempty"`
	Untracked bool     `yaml:"untracked,omitempty"`
	When      string   `yaml:"when,omitempty"`
}

type Assets

type Assets struct {
	Links []*LinksItems `yaml:"links"`
}

type CoverageReport

type CoverageReport struct {
	CoverageFormat any    `yaml:"coverage_format,omitempty"`
	Path           string `yaml:"path,omitempty"`
}

type Default

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

type GitlabCIConfiguration

type GitlabCIConfiguration struct {
	AfterScript  *common.Script `yaml:"after_script"`
	BeforeScript *common.Script `yaml:"before_script"`
	Cache        *common.Cache  `yaml:"cache"`
	Default      *Default       `yaml:"default"`
	Image        *common.Image  `yaml:"image"`
	Include      *Include       `yaml:"include"`

	Pages    any   `yaml:"pages"`
	Services []any `yaml:"services"`

	// Groups jobs into stages. All jobs in one stage must complete before next stage is executed. Defaults to ['build', 'test', 'deploy'].
	Stages    []string                        `yaml:"stages"`
	Variables *common.EnvironmentVariablesRef `yaml:"variables"`
	Workflow  *Workflow                       `yaml:"workflow"`
	Jobs      map[string]*Job                 `yaml:",inline"`
}

type Include

type Include []IncludeItem

func (*Include) UnmarshalYAML

func (i *Include) UnmarshalYAML(node *yaml.Node) error

type IncludeItem

type IncludeItem struct {
	Project  string   `yaml:"project"`
	Ref      string   `yaml:"ref"`
	Template string   `yaml:"template"`
	File     []string `yaml:"file"`

	Local  string `yaml:"local"`
	Remote string `yaml:"remote"`

	FileReference *models.FileReference
}

func (*IncludeItem) UnmarshalYAML

func (it *IncludeItem) UnmarshalYAML(node *yaml.Node) error

type Job

type Job struct {
	AfterScript  *common.Script `yaml:"after_script"`
	BeforeScript *common.Script `yaml:"before_script"`

	AllowFailure  *jobModels.AllowFailure         `yaml:"allow_failure"`
	Artifacts     *Artifacts                      `yaml:"artifacts"`
	Cache         *common.Cache                   `yaml:"cache"`
	Coverage      string                          `yaml:"coverage"`
	Dependencies  []string                        `yaml:"dependencies"`
	Environment   any                             `yaml:"environment"` // TODO: implement
	Extends       any                             `yaml:"extends"`
	Image         *common.Image                   `yaml:"image"`
	Inherit       *jobModels.Inherit              `yaml:"inherit"`
	Interruptible bool                            `yaml:"interruptible"`
	Needs         *job.Needs                      `yaml:"needs"`
	Parallel      *jobModels.Parallel             `yaml:"parallel"`
	Release       *Release                        `yaml:"release"`
	ResourceGroup string                          `yaml:"resource_group"`
	Retry         *common.Retry                   `yaml:"retry"`
	Rules         *common.Rules                   `yaml:"rules"`
	Script        *common.Script                  `yaml:"script"`
	Secrets       *Secrets                        `yaml:"secrets"`
	Services      []any                           `yaml:"services"` // TODO: implement
	Stage         string                          `yaml:"stage"`
	StartIn       string                          `yaml:"start_in"`
	Tags          []string                        `yaml:"tags"`
	Timeout       string                          `yaml:"timeout"`
	Trigger       *jobModels.Trigger              `yaml:"trigger"`
	Variables     *common.EnvironmentVariablesRef `yaml:"variables"`
	When          string                          `yaml:"when"`

	Except *jobModels.Controls `yaml:"except"`
	Only   *jobModels.Controls `yaml:"only"`

	FileReference *models.FileReference
}

func (*Job) UnmarshalYAML

func (j *Job) UnmarshalYAML(node *yaml.Node) error

There's a bug in go-yaml and this is the only way we can currently have the jobs inside the ci configuration while keeping the job's file reference. Without overcomplicating, the bug won't allow us to both implement UnmarshalYAML and parse Job inline (as in, without a separate internal field)

type LinksItems

type LinksItems struct {
	Filepath string `yaml:"filepath"`
	LinkType string `yaml:"link_type"`
	Name     string `yaml:"name"`
	Url      string `yaml:"url"`
}

type Release

type Release struct {
	Assets      *Assets  `yaml:"assets"`
	Description string   `yaml:"description"`
	Milestones  []string `yaml:"milestones"`
	Name        string   `yaml:"name"`
	Ref         string   `yaml:"ref"`
	ReleasedAt  string   `yaml:"released_at"`
	TagName     string   `yaml:"tag_name"`
}

type Reports

type Reports struct {
	CoverageReport *CoverageReport `yaml:"coverage_report,omitempty"`

	Codequality        any `yaml:"codequality,omitempty"`
	ContainerScanning  any `yaml:"container_scanning,omitempty"`
	Dast               any `yaml:"dast,omitempty"`
	DependencyScanning any `yaml:"dependency_scanning,omitempty"`
	Dotenv             any `yaml:"dotenv,omitempty"`
	Junit              any `yaml:"junit,omitempty"`
	LicenseManagement  any `yaml:"license_management,omitempty"`
	LicenseScanning    any `yaml:"license_scanning,omitempty"`
	Lsif               any `yaml:"lsif,omitempty"`
	Metrics            any `yaml:"metrics,omitempty"`
	Performance        any `yaml:"performance,omitempty"`
	Requirements       any `yaml:"requirements,omitempty"`
	Sast               any `yaml:"sast,omitempty"`
	SecretDetection    any `yaml:"secret_detection,omitempty"`
	Terraform          any `yaml:"terraform,omitempty"`
}

type Secrets

type Secrets struct {
	AdditionalProperties map[string]*SecretsItem `yaml:"-"`
}

type SecretsItem

type SecretsItem struct {
	Vault any `yaml:"vault"`
}

type Workflow

type Workflow struct {
	Rules *common.Rules `yaml:"rules"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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