Documentation ¶
Index ¶
Constants ¶
const DefaultStage = "default"
DefaultStage is the stage into which steps that have no stage are placed during the parsing process.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifacts ¶
type Artifacts struct {
Paths []string `json:"paths,omitempty"`
}
Artifacts represents a set of paths that should be treated as artifacts and archived in some way.
type Pipeline ¶
type Pipeline struct { Image string `json:"image,omitempty"` Variables map[string]string `json:"variables,omitempty"` BeforeScript []string `json:"before_script,omitempty"` AfterScript []string `json:"after_script,omitempty"` Stages []string `json:"stages,omitempty"` Tasks []*Task `json:"tasks,omitempty"` TektonConfig *TektonConfig `json:"tekton,omitempty"` }
Pipeline represents the parsed Pipeline.
func Parse ¶
Parse decodes YAML describing a CI pipeline and returns the configuration.
Decoded tasks are given put into the "default" Stage.
If no explicit ordering of the Stages is provided, they're subject to hash ordering.
func (Pipeline) TasksForStage ¶
TasksForStage returns the named jobs for a specific stage.
type Task ¶
type Task struct { Name string `json:"name"` Stage string `json:"stage,omitempty"` Tekton *TektonTask `json:"tekton,omitempty"` Script []string `json:"script,omitempty"` Artifacts Artifacts `json:"artifacts,omitempty"` Rules []Rule `json:"rules,omitempty"` }
Task represents the parsed Task from the Pipeline.
type TektonConfig ¶
type TektonConfig struct {
ServiceAccountName string `json:"serviceAccountName"`
}
TektonConfig provides global configuration for the DSL script specifically for Tekton.
type TektonTask ¶
type TektonTask struct { // Used to generate a matrix of configurations for parallel jobs. Jobs []map[string]string `json:"jobs,omitempty"` TaskRef string `json:"taskRef,omitempty"` Params []TektonTaskParam `json:"params,omitempty"` Image string `json:"image,omitempty"` }
TektonTask is an extension for executing Tekton Tasks.
type TektonTaskParam ¶
TektonTaskParam is passed into a Tekton task.