Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindDirArtifactOwnerForPath ¶
func FindDirArtifactOwnerForPath( relPath string, artifacts map[string]*artifact.Artifact, ) (*artifact.Artifact, bool)
FindDirArtifactOwnerForPath searches the given map for a directory Artifact that should own relPath. relPath should share a base with the Artifacts in the map (hence the name).
Types ¶
type Stage ¶
type Stage struct { // Checksum is the checksum of the Stage definition excluding Artifact // checksums. This checksum is used to determine when a Stage definition // has been modified by the user. Checksum string `yaml:",omitempty"` // Command is the string to be evaluated and executed by a shell. Command string `yaml:",omitempty"` // WorkingDir is the directory in which the Stage's command is executed. It // is a directory path relative to the Dud root directory. An // empty value means the Stage's working directory _is_ the Dud root // directory. WorkingDir only affects the Stage's command; all inputs and // outputs of the Stage should have paths relative to the project root. WorkingDir string `yaml:"working-dir,omitempty"` // Inputs is a set of Artifacts which the Stage's Command needs to // operate. The Artifacts are keyed by their Path for faster lookup. Inputs map[string]*artifact.Artifact `yaml:",omitempty"` // Outputs is a set of Artifacts which are owned by the Stage. The // Artifacts are keyed by their Path for faster lookup. Outputs map[string]*artifact.Artifact }
A Stage holds all information required to reproduce data. It is the primary building block of Dud pipelines.
func (Stage) CalculateChecksum ¶
CalculateChecksum returns the checksum of the Stage as it would be set in the Checksum field.
func (Stage) CreateCommand ¶
CreateCommand return an exec.Cmd for the Stage.
func (Stage) Validate ¶ added in v0.1.0
Validate returns an error describing a problem with the given Stage. If there are no problems with the Stage definition this method returns nil. If stagePath is not empty, Artifacts matching stagePath will cause an error; stages cannot track or reference themselves.
type Status ¶
type Status struct { // HasChecksum is true if the Stage had a non-empty Checksum field. HasChecksum bool // ChecksumMatches is true if the checksum of the Stage's definition // matches its Checksum field. ChecksumMatches bool ArtifactStatus map[string]artifact.Status }
Status holds everything necessary to qualify the state of a Stage.