Documentation
¶
Index ¶
- Constants
- type AllowFailure
- type Artifacts
- type AutoCancel
- type Cache
- type Image
- type Include
- type Job
- type Need
- type Needs
- type Pipeline
- type Rule
- type Variables
- func (vars Variables) Copy() Variables
- func (vars Variables) ForJob(job Job) Variables
- func (vars Variables) ForPipeline(pipeline Pipeline) Variables
- func (vars Variables) Overwrite(overwrites Variables) Variables
- func (vars Variables) WithBranch(branch string) Variables
- func (vars Variables) WithDefaultBranch(defaultBranch string) Variables
- func (vars Variables) WithMergeRequest() Variables
- type WorkFlow
- type WorkflowRule
Constants ¶
View Source
const ( WHEN_ON_SUCCESS = "on_success" WHEN_ON_FAILURE = "on_failure" WHEN_NEVER = "never" WHEN_ALWAYS = "always" WHEN_MANUAL = "manual" WHEN_DELAYED = "delayed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowFailure ¶
type AllowFailure struct { AllowFailure bool `default:"false"` AllowFailureExitCodes []int `default:"[]"` }
func (*AllowFailure) Parse ¶
func (a *AllowFailure) Parse(template any) error
type Artifacts ¶
type AutoCancel ¶
type AutoCancel struct { Commit string `gitlabci:"on_new_commit"` JobFailure string `gitlabci:"on_job_failure"` }
func (*AutoCancel) Parse ¶
func (ac *AutoCancel) Parse(template any) error
type Include ¶
type Job ¶
type Job struct { Name string `json:"name"` Image Image `default:"{}" json:"image"` Stage string `default:"test" json:"stage"` Script []string `json:"script"` BeforeScript []string `default:"[]" gitlabci:"before_script" json:"before_script"` AfterScript []string `default:"[]" gitlabci:"after_script" json:"after_script"` When string `default:"on_success" json:"on_success"` Rules []Rule `json:"rules"` Needs Needs `gitlabci:"needs" json:"needs"` Dependencies []string `json:"dependencies"` Variables map[string]string `json:"variables"` Interruptible bool `json:"interruptible"` Extends []string `json:"extends"` AllowFailure AllowFailure `gitlabci:"allow_failure" json:"allow_failure"` Artifacts Artifacts `json:"artifacts"` Cache Cache `json:"cache"` Coverage string `json:"coverage"` // contains filtered or unexported fields }
func (Job) GetActiveJob ¶
Get a copy of the current job, but overwritten with the first active rule
type Need ¶
type Needs ¶
type Pipeline ¶
type Pipeline struct { Stages []string `default:"[\"build\", \"test\", \"deploy\"]" json:"stages"` Include []Include `default:"[]" json:"include"` Jobs map[string]Job `default:"{}" json:"jobs"` Variables map[string]string `json:"variables"` WorkFlow WorkFlow `json:"workflow"` Default Job `json:"default"` // contains filtered or unexported fields }
func (*Pipeline) GetActiveJobs ¶
func (*Pipeline) GetJobsByStage ¶
type Rule ¶
type Variables ¶
func NewVariables ¶
func NewVariables() Variables
func (Variables) ForJob ¶
Creates a copy of the current variables and with additional job variables set
func (Variables) ForPipeline ¶
func (Variables) WithBranch ¶
func (Variables) WithDefaultBranch ¶
func (Variables) WithMergeRequest ¶
type WorkflowRule ¶
type WorkflowRule struct { Rule AutoCancel AutoCancel `gitlabci:"auto_cancel"` }
func (*WorkflowRule) Parse ¶
func (rule *WorkflowRule) Parse(template any) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.