Documentation ¶
Index ¶
- Constants
- type AllowFailure
- type Artifacts
- type AssetLink
- type Assets
- type Cache
- type CacheKey
- type Change
- type Conditions
- type DASTConfiguration
- type Default
- type Environment
- type Forward
- type IDToken
- type Image
- type Include
- type Inherit
- type InheritKeys
- type Job
- type Kubernetes
- type Need
- type Needs
- type Parallel
- type Pipeline
- type Release
- type Retry
- type Rule
- type Secret
- type Stringorslice
- type Trigger
- type Variable
- type Vault
- type VaultEngine
- type Workflow
Constants ¶
const ( RetryAlways = "always" RetryUnknownFailure = "unknown_failure" RetryScriptFailure = "script_failure" RetryApiFailure = "api_failure" RetrySturckOrTimeoutFailure = "stuck_or_timeout_failure" RetryRunnerSystemFailure = "runner_system_failure" RetryRunnerUnsupported = "runner_unsupported" RetryStaleSchedule = "stale_schedule" RetryJobExecutionTimeout = "job_execution_timeout" RetryArchivedFailure = "archived_failure" RetrySchedulerFailure = "scheduler_failure" RetryIntegrityFailure = "data_integrity_failure" )
Enum of retry when types https://docs.gitlab.com/ee/ci/yaml/#retrywhen
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowFailure ¶
func (*AllowFailure) MarshalYAML ¶
func (v *AllowFailure) MarshalYAML() (interface{}, error)
MarshalYAML implements the Marshal interface.
func (*AllowFailure) UnmarshalYAML ¶
func (v *AllowFailure) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the unmarshal interface.
type Artifacts ¶
type Artifacts struct { Paths Stringorslice `yaml:"paths,omitempty"` Exclude Stringorslice `yaml:"exclude,omitempty"` ExpireIn string `yaml:"expire_in,omitempty"` ExposeAs string `yaml:"expose_as,omitempty"` Name string `yaml:"name,omitempty"` Public *bool `yaml:"public,omitempty"` Reports map[string]interface{} `yaml:"reports,omitempty"` Untracked bool `yaml:"untracked,omitempty"` When string `yaml:"when,omitempty"` // on_success, on_failure, always }
type Cache ¶
type Cache struct { Paths Stringorslice `yaml:"paths,omitempty"` Key *CacheKey `yaml:"key,omitempty"` Untracked bool `yaml:"untracked,omitempty"` Unprotect bool `yaml:"unprotect,omitempty"` When string `yaml:"when,omitempty"` // on_success, on_failure, always Policy string `yaml:"policy,omitempty"` // pull, push, pull-push FallbackKeys Stringorslice `yaml:"fallback_keys,omitempty"` }
type CacheKey ¶
type CacheKey struct { Value string `yaml:"-"` Files Stringorslice `yaml:"files,omitempty"` Prefix string `yaml:"prefix,omitempty"` }
func (*CacheKey) MarshalYAML ¶
func (*CacheKey) UnmarshalYAML ¶
type Conditions ¶
type Conditions struct { Refs []string `yaml:"refs,omitempty"` Variables []string `yaml:"variables,omitempty"` Changes []string `yaml:"changes,omitempty"` Kubernetes string `yaml:"kubernetes,omitempty"` }
func (*Conditions) MarshalYAML ¶
func (c *Conditions) MarshalYAML() (interface{}, error)
func (*Conditions) UnmarshalYAML ¶
func (c *Conditions) UnmarshalYAML(unmarshal func(interface{}) error) error
type DASTConfiguration ¶
type Default ¶
type Default struct { After []string `yaml:"after_script,omitempty"` Before []string `yaml:"before_script,omitempty"` Artifacts *Artifacts `yaml:"artifacts,omitempty"` Cache *Cache `yaml:"cache,omitempty"` Image *Image `yaml:"image,omitempty"` Interruptible bool `yaml:"interruptible,omitempty"` Retry *Retry `yaml:"retry,omitempty"` Services []*Image `yaml:"services,omitempty"` Tags []string `yaml:"tags,omitempty"` Timeout string `yaml:"duration,omitempty"` }
Default defines global pipeline defaults.
type Environment ¶
type Environment struct { Name string `yaml:"name,omitempty"` Url string `yaml:"url,omitempty"` OnStop string `yaml:"on_stop,omitempty"` Action string `yaml:"action,omitempty"` // start, prepare, stop, verify, access AutoStopIn string `yaml:"auto_stop_in,omitempty"` DeploymentTier string `yaml:"deployment_tier,omitempty"` // production, staging, testing, development, other Kubernetes *Kubernetes `yaml:"kubernetes,omitempty"` }
func (*Environment) UnmarshalYAML ¶
func (v *Environment) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the unmarshal interface.
type Image ¶
type Image struct { Name string `yaml:"name,omitempty"` Alias string `yaml:"alias,omitempty"` Entrypoint Stringorslice `yaml:"entrypoint,omitempty"` Command Stringorslice `yaml:"command,omitempty"` PullPolicy Stringorslice `yaml:"pull_policy,omitempty"` // single string or array of strings }
Image defines a container image. https://docs.gitlab.com/ee/ci/yaml/#image
func (*Image) UnmarshalYAML ¶
UnmarshalYAML implements the unmarshal interface.
type Include ¶
type Include struct { Local string `yaml:"local,omitempty"` Project string `yaml:"project,omitempty"` Ref string `yaml:"ref,omitempty"` Remote string `yaml:"remote,omitempty"` Template string `yaml:"template,omitempty"` File Stringorslice `yaml:"file,omitempty"` }
Include includes external yaml files. https://docs.gitlab.com/ee/ci/yaml/#include
func (*Include) UnmarshalYAML ¶
UnmarshalYAML implements the unmarshal interface.
type Inherit ¶
type Inherit struct { Default *InheritKeys `yaml:"default,omitempty"` Variables *InheritKeys `yaml:"variables,omitempty"` }
func (*Inherit) MarshalYAML ¶
func (*Inherit) UnmarshalYAML ¶
UnmarshalYAML implements the unmarshal interface for Inherit.
type InheritKeys ¶
func (*InheritKeys) UnmarshalYAML ¶
func (v *InheritKeys) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the unmarshal interface for InheritKeys.
type Job ¶
type Job struct { After Stringorslice `yaml:"after_script,omitempty"` Artifacts *Artifacts `yaml:"artifacts,omitempty"` AllowFailure *AllowFailure `yaml:"allow_failure,omitempty"` Before Stringorslice `yaml:"before_script,omitempty"` Cache *Cache `yaml:"cache,omitempty"` Coverage string `yaml:"coverage,omitempty"` DASTConfiguration *DASTConfiguration `yaml:"dast_configuration,omitempty"` Dependencies Stringorslice `yaml:"dependencies,omitempty"` Environment *Environment `yaml:"environment,omitempty"` Except *Conditions `yaml:"except,omitempty"` Extends Stringorslice `yaml:"extends,omitempty"` Hooks map[string]Stringorslice `yaml:"hooks,omitempty"` IDTokens map[string]*IDToken `yaml:"id_tokens,omitempty"` Image *Image `yaml:"image,omitempty"` Inherit *Inherit `yaml:"inherit,omitempty"` Interruptible bool `yaml:"interruptible,omitempty"` Needs *Needs `yaml:"needs,omitempty"` Only *Conditions `yaml:"only,omitempty"` Pages *Job `yaml:"pages,omitempty"` Parallel *Parallel `yaml:"parallel,omitempty"` Publish string `yaml:"publish,omitempty"` Release *Release `yaml:"release,omitempty"` ResourceGroup string `yaml:"resource_group,omitempty"` Retry *Retry `yaml:"retry,omitempty"` Rules []*Rule `yaml:"rules,omitempty"` Script Stringorslice `yaml:"script,omitempty"` Secrets map[string]*Secret `yaml:"secrets,omitempty"` Services []*Image `yaml:"services,omitempty"` Stage string `yaml:"stage,omitempty"` Tags Stringorslice `yaml:"tags,omitempty"` Timeout string `yaml:"timeout,omitempty"` Trigger *Trigger `yaml:"trigger,omitempty"` Variables map[string]*Variable `yaml:"variables,omitempty"` When string `yaml:"when,omitempty"` // on_success, manual, always, on_failure, delayed, never }
Job defines a gitlab job. https://docs.gitlab.com/ee/ci/yaml/#job-keywords
func (*Job) UnmarshalYAML ¶
UnmarshalYAML implements the unmarshal interface.
type Kubernetes ¶
type Kubernetes struct {
Namespace string `yaml:"namespace,omitempty"`
}
type Need ¶
type Need struct { Job string `yaml:"job,omitempty"` Ref string `yaml:"ref,omitempty"` Project string `yaml:"project,omitempty"` Pipeline string `yaml:"pipeline,omitempty"` Artifacts bool `yaml:"artifacts,omitempty"` Optional bool `yaml:"optional,omitempty"` }
func (*Need) UnmarshalYAML ¶
UnmarshalYAML implements the unmarshal interface.
type Needs ¶
type Needs struct {
Items []*Need
}
func (*Needs) MarshalYAML ¶
func (*Needs) UnmarshalYAML ¶
UnmarshalYAML implements the unmarshal interface.
type Parallel ¶
type Parallel struct { Count int `yaml:"-,omitempty"` Matrix []map[string][]string `yaml:"matrix,omitempty"` }
func (*Parallel) MarshalYAML ¶
func (*Parallel) UnmarshalYAML ¶
UnmarshalYAML implements the unmarshal interface.
type Pipeline ¶
type Pipeline struct { Artifacts *Artifacts `yaml:"artifacts,omitempty"` Schema string Default *Default Include []*Include Image *Image Services []*Image BeforeScript []string AfterScript []string Variables map[string]*Variable Cache *Cache Stages []string Pages *Job Workflow *Workflow Jobs map[string]*Job TemplateJobs map[string]*Job `yaml:"-"` }
Pipeline defines a gitlab pipeline.
func ParseBytes ¶
ParseBytes parses the configuration from bytes b.
func ParseString ¶
ParseString parses the configuration from string s.
func (*Pipeline) MarshalYAML ¶
MarshalYAML implements yaml marshalling.
func (*Pipeline) UnmarshalYAML ¶
type Release ¶
type Release struct { Tag string `yaml:"tag_name,omitempty"` TagMessage string `yaml:"tag_message,omitempty"` Name string `yaml:"name,omitempty"` Desc string `yaml:"description,omitempty"` Ref string `yaml:"ref,omitempty"` Milestones Stringorslice `yaml:"milestones,omitempty"` ReleasedAt string `yaml:"released_at,omitempty"` Assets *Assets `yaml:"assets,omitempty"` }
type Retry ¶
type Retry struct { Max int `yaml:"max,omitempty"` When Stringorslice `yaml:"when,omitempty"` }
Retry defines retry logic.
func (*Retry) MarshalYAML ¶
func (*Retry) UnmarshalYAML ¶
UnmarshalYAML implements the unmarshal interface.
type Rule ¶
type Rule struct { If string `yaml:"if,omitempty"` Changes Change `yaml:"changes,omitempty"` Exists []string `yaml:"exists,omitempty"` AllowFailures bool `yaml:"allow_failure,omitempty"` Variables map[string]string `yaml:"variables,omitempty"` When string `yaml:"when,omitempty"` Needs []string `yaml:"needs,omitempty"` }
type Stringorslice ¶
type Stringorslice []string
Stringorslice represents a string or an array of strings.
func (*Stringorslice) UnmarshalYAML ¶
func (s *Stringorslice) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the unmarshal interface.
type Trigger ¶
type Trigger struct { Project string `yaml:"-"` Branch string `yaml:"branch,omitempty"` Include string `yaml:"include,omitempty"` Strategy string `yaml:"strategy,omitempty"` Forward *Forward `yaml:"forward,omitempty"` }
func (*Trigger) MarshalYAML ¶
func (*Trigger) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
type Variable ¶
type Variable struct { Value string `yaml:"value,omitempty"` Desc string `yaml:"description,omitempty"` Options Stringorslice `yaml:"options,omitempty"` Expand *bool `yaml:"expand,omitempty"` }
func (*Variable) MarshalYAML ¶
func (*Variable) UnmarshalYAML ¶
UnmarshalYAML implements the unmarshal interface.
type Vault ¶
type Vault struct { Engine *VaultEngine `yaml:"engine,omitempty"` Path string `yaml:"path,omitempty"` Field string `yaml:"field,omitempty"` }
func (*Vault) UnmarshalYAML ¶
UnmarshalYAML implements the unmarshal interface.