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 NewDagFromTask ¶ added in v1.0.5
NewDagFromTask creates a new Dag based on the specified Task.
type Node ¶
Node represents a vertex in a Dag.
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"`
Cmd string `yaml:"cmd"`
Build string `yaml:"build"`
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"`
Keep bool `yaml:"keep"`
Detach bool `yaml:"detach"`
StartDelay int `yaml:"startDelay"`
Privileged bool `yaml:"privileged"`
User string `yaml:"user"`
Network string `yaml:"network"`
Isolation string `yaml:"isolation"`
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 []*image.Dependencies
Tags []string
BuildArgs []string
}
Step is a step in the execution task.
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" )
type Task ¶ added in v1.0.5
type Task 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"`
Version string `yaml:"version,omitempty"`
RegistryName string
RegistryUsername string
RegistryPassword string
Dag *Dag
}
Task represents a task execution.
func NewTask ¶ added in v1.0.5
func NewTask( steps []*Step, push []string, secrets []*Secret, registry string, user string, pw string) (*Task, error)
NewTask returns a default Task object.
func UnmarshalTaskFromFile ¶ added in v1.0.5
UnmarshalTaskFromFile unmarshals a Task from a file.
func UnmarshalTaskFromString ¶ added in v1.0.5
UnmarshalTaskFromString unmarshals a Task from a raw string.
func (*Task) UsingRegistryCreds ¶ added in v1.0.5
UsingRegistryCreds determines whether or not the Task is using registry creds.