Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifacts ¶
type Artifacts struct {
Paths []string `yaml:"paths,omitempty"`
ExpireIn string `yaml:"expire_in,omitempty"`
Reports *Reports `yaml:"reports,omitempty"`
Name string `yaml:"name,omitempty"`
Untracked bool `yaml:"untracked,omitempty"`
When string `yaml:"when,omitempty"`
ExposeAs string `yaml:"expose_as,omitempty"`
}
Artifacts represents job artifacts.
type Cache ¶
type Cache struct {
Key string `yaml:"key"`
Paths []string `yaml:"paths"`
Policy string `yaml:"policy,omitempty"`
}
Cache represents GitLab CI cache configuration.
type DefaultConfig ¶
type DefaultConfig struct {
Image *ImageConfig `yaml:"image,omitempty"`
}
DefaultConfig represents default job configuration.
type IDToken ¶
type IDToken struct {
Aud string `yaml:"aud"`
}
IDToken represents GitLab CI OIDC token configuration.
type ImageConfig ¶
type ImageConfig struct {
Name string `yaml:"name,omitempty"`
Entrypoint []string `yaml:"entrypoint,omitempty"`
}
ImageConfig represents GitLab CI image configuration.
func (ImageConfig) MarshalYAML ¶
func (img ImageConfig) MarshalYAML() (any, error)
MarshalYAML emits the short string form when entrypoint is empty.
type Job ¶
type Job struct {
Stage string `yaml:"stage"`
Image *ImageConfig `yaml:"image,omitempty"`
Script []string `yaml:"script"`
BeforeScript []string `yaml:"before_script,omitempty"`
AfterScript []string `yaml:"after_script,omitempty"`
Variables map[string]string `yaml:"variables,omitempty"`
Needs []JobNeed `yaml:"needs,omitempty"`
Rules []Rule `yaml:"rules,omitempty"`
Artifacts *Artifacts `yaml:"artifacts,omitempty"`
Cache *Cache `yaml:"cache,omitempty"`
Secrets map[string]*Secret `yaml:"secrets,omitempty"`
IDTokens map[string]*IDToken `yaml:"id_tokens,omitempty"`
When string `yaml:"when,omitempty"`
AllowFailure bool `yaml:"allow_failure,omitempty"`
Tags []string `yaml:"tags,omitempty"`
ResourceGroup string `yaml:"resource_group,omitempty"`
}
Job represents a GitLab CI job.
type Pipeline ¶
type Pipeline struct {
Stages []string `yaml:"stages"`
Variables map[string]string `yaml:"variables,omitempty"`
Default *DefaultConfig `yaml:"default,omitempty"`
Jobs map[string]*Job `yaml:"-"`
Workflow *Workflow `yaml:"workflow,omitempty"`
}
Pipeline represents a GitLab CI pipeline.
type Reports ¶
type Reports struct {
Terraform []string `yaml:"terraform,omitempty"`
JUnit []string `yaml:"junit,omitempty"`
Cobertura []string `yaml:"cobertura,omitempty"`
}
Reports represents artifact reports.
type Rule ¶
type Rule struct {
If string `yaml:"if,omitempty"`
When string `yaml:"when,omitempty"`
Changes []string `yaml:"changes,omitempty"`
}
Rule represents a job or workflow rule.
type Secret ¶
type Secret struct {
Vault *VaultSecret `yaml:"vault,omitempty"`
VaultPath string `yaml:"-"`
File bool `yaml:"file,omitempty"`
}
Secret represents GitLab CI secret configuration.
func (Secret) MarshalYAML ¶
MarshalYAML emits the short vault syntax when configured.
type VaultEngine ¶
VaultEngine represents Vault secrets engine configuration.
type VaultSecret ¶
type VaultSecret struct {
Engine *VaultEngine `yaml:"engine,omitempty"`
Path string `yaml:"path,omitempty"`
Field string `yaml:"field,omitempty"`
}
VaultSecret represents a secret from HashiCorp Vault.