Documentation
¶
Index ¶
Constants ¶
const (
// ImmediateExecutionToken defines the when dependency to indicate a step should execute immediately.
ImmediateExecutionToken = "-"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dag ¶
Dag represents a thread safe directed acyclic graph.
func NewDagFromPipeline ¶
NewDagFromPipeline creates a new Dag based on the specified pipeline.
type Node ¶
Node represents a vertex in a Dag.
type Pipeline ¶
type Pipeline struct { Steps []*Step `yaml:"steps"` StepTimeout int `yaml:"stepTimeout,omitempty"` TotalTimeout int `yaml:"totalTimeout,omitempty"` Push []string `yaml:"push,omitempty"` Secrets []*Secret `yaml:"secrets,omitempty"` WorkDir string `yaml:"workDir,omitempty"` RegistryName string RegistryUsername string RegistryPassword string Dag *Dag }
Pipeline represents a build pipeline.
func NewPipeline ¶
func NewPipeline( steps []*Step, push []string, secrets []*Secret, registry string, user string, pw string) (*Pipeline, error)
NewPipeline returns a default Pipeline object.
func UnmarshalPipelineFromFile ¶
UnmarshalPipelineFromFile unmarshals a pipeline from a file.
func UnmarshalPipelineFromString ¶
UnmarshalPipelineFromString unmarshals a pipeline from a raw string.
func (*Pipeline) UsingRegistryCreds ¶
UsingRegistryCreds determines whether or not the pipeline is using registry creds.
type Secret ¶
type Secret struct { Akv string `yaml:"akv,omitempty"` SecretEnv string `yaml:"secretEnv,omitempty"` }
Secret defines a wrapper to translate Azure Key Vault secrets to environment variables.
type SelfReferencedStepError ¶
type SelfReferencedStepError struct {
// contains filtered or unexported fields
}
SelfReferencedStepError defines an error to be returned if the Step is self-referenced.
func NewSelfReferencedStepError ¶
func NewSelfReferencedStepError(message string) *SelfReferencedStepError
NewSelfReferencedStepError creates a new SelfReferencedStepError with the specified message.
func (*SelfReferencedStepError) Error ¶
func (e *SelfReferencedStepError) Error() string
Error returns the error message for a SelfReferencedStepError.
type Step ¶
type Step struct { ID string `yaml:"id"` Run string `yaml:"run"` WorkDir string `yaml:"workDir"` EntryPoint string `yaml:"entryPoint"` Envs []string `yaml:"envs"` SecretEnvs []string `yaml:"secretEnvs"` Ports []string `yaml:"ports"` When []string `yaml:"when"` ExitedWith []int `yaml:"exitedWith"` ExitedWithout []int `yaml:"exitedWithout"` Timeout int `yaml:"timeout"` Rm bool `yaml:"rm"` Detach bool `yaml:"detach"` StartDelay int `yaml:"startDelay"` StartTime time.Time EndTime time.Time StepStatus StepStatus // CompletedChan can be used to signal to readers // that the step has been processed. CompletedChan chan bool ImageDependencies []*models.ImageDependencies Tags []string BuildArgs []string }
Step is a step in the execution pipeline.
func (*Step) IsBuildStep ¶
IsBuildStep returns true if the Step is a build step, false otherwise.
func (*Step) ShouldExecuteImmediately ¶
ShouldExecuteImmediately returns true if the Step should be executed immediately.
type StepStatus ¶
type StepStatus string
StepStatus is an enum for step statuses.
const ( // InProgress means the step is being processed. InProgress StepStatus = "inprogress" // Successful means the step completed and was successful. Successful StepStatus = "successful" // Skipped means the step has been skipped. Skipped StepStatus = "skipped" // Failed means the step failed because of an error. Failed StepStatus = "failed" )