models

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSAuth added in v0.3.0

type AWSAuth struct {
	AccessKey string `yaml:"access-key"`
	SecretKey string `yaml:"secret-key"`
	OIDCRole  string `yaml:"oidc-role"`
}

func (*AWSAuth) GetAuthData added in v0.3.0

func (a *AWSAuth) GetAuthData(image string) (*ecr.AuthorizationData, error)

type Action

type Action struct {
	Step     *Step     `yaml:"step"`
	Parallel *Parallel `yaml:"parallel"`
	Stage    *Stage    `yaml:"stage"`
}

func (*Action) IsParallel

func (a *Action) IsParallel() bool

func (*Action) IsStage added in v0.6.0

func (a *Action) IsStage() bool

func (*Action) IsStep added in v0.6.0

func (a *Action) IsStep() bool

type Artifact

type Artifact struct {
	Paths    []string
	Download bool
}

func (*Artifact) UnmarshalYAML

func (a *Artifact) UnmarshalYAML(node *yaml.Node) error

type Cache

type Cache struct {
	Path string    `yaml:"path"`
	Key  *CacheKey `yaml:"key"`
}

func NewCache

func NewCache(path string, files []string) *Cache

func (*Cache) IsSmartCache

func (c *Cache) IsSmartCache() bool

func (*Cache) UnmarshalYAML

func (c *Cache) UnmarshalYAML(value *yaml.Node) error

type CacheKey

type CacheKey struct {
	Files []string `yaml:"files"`
}

type Caches

type Caches map[string]*Cache

func (Caches) Get

func (c Caches) Get(name string) *Cache

func (Caches) Set

func (c Caches) Set(name string, cache *Cache)

type ChangeSet

type ChangeSet struct {
	IncludePaths []string `yaml:"includePaths"`
}

type CmdScript

type CmdScript struct {
	Cmd string
}

func (*CmdScript) Type

func (c *CmdScript) Type() ScriptType

type Condition

type Condition struct {
	ChangeSets ChangeSet `yaml:"changesets"`
}

type Definition

type Definition struct {
	Caches   Caches              `yaml:"caches"`
	Services map[string]*Service `yaml:"services"`
}

type Image added in v0.3.0

type Image struct {
	Name      string   `yaml:"name"`
	Username  string   `yaml:"username"`
	Password  string   `yaml:"password"`
	RunAsUser int      `yaml:"run-as-user"`
	AWS       *AWSAuth `yaml:"aws"`
}

func (*Image) UnmarshalYAML added in v0.3.0

func (i *Image) UnmarshalYAML(value *yaml.Node) error

type Parallel

type Parallel struct {
	Actions  []*Action `yaml:"steps"`
	FailFast bool      `yaml:"fail-fast"`
}

func (*Parallel) UnmarshalYAML added in v0.3.0

func (p *Parallel) UnmarshalYAML(value *yaml.Node) error

type Pipe

type Pipe struct {
	Name      string            `yaml:"name"`
	Pipe      string            `yaml:"pipe"`
	Variables map[string]string `yaml:"variables"`
}

func (*Pipe) Type

func (p *Pipe) Type() ScriptType

type Pipeline

type Pipeline struct {
	Default      []*Action            `yaml:"default"`
	Branches     map[string][]*Action `yaml:"branches"`
	PullRequests map[string][]*Action `yaml:"pull-requests"`
	Tags         map[string][]*Action `yaml:"tags"`
	Custom       map[string][]*Action `yaml:"custom"`
}

type Plan

type Plan struct {
	DefaultImage *Image      `yaml:"image"`
	Pipelines    *Pipeline   `yaml:"pipelines"`
	Definitions  *Definition `yaml:"definitions"`
}

func (*Plan) GetCaches

func (p *Plan) GetCaches() Caches

func (*Plan) GetPipeline

func (p *Plan) GetPipeline(name string) []*Action

func (*Plan) GetPipelineNames added in v0.4.0

func (p *Plan) GetPipelineNames() []string

func (*Plan) HasImage added in v0.3.0

func (p *Plan) HasImage() bool

type ScriptItem

type ScriptItem interface {
	Type() ScriptType
}

type ScriptType

type ScriptType string
const ScriptTypeCmd ScriptType = "cmd"
const ScriptTypePipe ScriptType = "pipe"

type Service added in v0.3.0

type Service struct {
	Image     *Image            `yaml:"image"`
	Memory    int               `yaml:"memory"`
	Variables map[string]string `yaml:"variables"`
	Type      string            `yaml:"type"`
}

func (*Service) IsDockerService added in v0.5.0

func (s *Service) IsDockerService() bool

type Stage added in v0.6.0

type Stage struct {
	Name       string       `yaml:"name"`
	Actions    []*Action    `yaml:"steps"`
	Condition  *Condition   `yaml:"condition"`
	Trigger    *StepTrigger `yaml:"trigger"`
	Deployment string       `yaml:"deployment"`
}

func (*Stage) MatchCondition added in v0.6.0

func (s *Stage) MatchCondition(changedFiles []string) bool

type Step

type Step struct {
	Name        string            `yaml:"name"`
	Image       *Image            `yaml:"image"`
	Script      StepScript        `yaml:"script"`
	AfterScript []string          `yaml:"after-script"`
	Environment map[string]string `yaml:"environment"`
	MaxTime     int               `yaml:"max-time"`
	Size        string            `yaml:"size"`
	Deployment  string            `yaml:"deployment"`
	Trigger     StepTrigger       `yaml:"trigger"`
	Artifacts   *Artifact         `yaml:"artifacts"`
	Caches      []string          `yaml:"caches"`
	Services    []string          `yaml:"services"`
	RunsOn      []string          `yaml:"runs-on"`
	Condition   *Condition        `yaml:"condition"`
}

func (*Step) GetName

func (s *Step) GetName() string

func (*Step) HasImage added in v0.3.0

func (s *Step) HasImage() bool

func (*Step) IsManual

func (s *Step) IsManual() bool

func (*Step) MatchCondition added in v0.5.0

func (s *Step) MatchCondition(changedFiles []string) bool

type StepScript

type StepScript []ScriptItem

func (*StepScript) HasPipe

func (s *StepScript) HasPipe() bool

func (*StepScript) UnmarshalYAML

func (s *StepScript) UnmarshalYAML(value *yaml.Node) error

type StepTrigger

type StepTrigger string
const StepTriggerAutomatic StepTrigger = "automatic"
const StepTriggerManual StepTrigger = "manual"

Jump to

Keyboard shortcuts

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