Documentation
¶
Index ¶
- Constants
- func AppendPreTrackOutputsToDefaultStepOutputVariables(defaultStepOutputVariables map[string]map[string]string, ...) map[string]map[string]string
- func AppendTrackOutput(trackOutputVariables map[string]map[string]string, output config.StepOutput) map[string]map[string]string
- func ExecuteDeployTrack(execution Execution, cfg config.Config, t Track, out chan<- Output)
- func ExecuteDeployTrackRegion(in <-chan RegionExecution, out chan<- RegionExecution)
- func ExecuteDestroyTrack(execution Execution, cfg config.Config, t Track, out chan<- Output)
- func ExecuteDestroyTrackRegion(in <-chan RegionExecution, out chan<- RegionExecution)
- func ExecuteStepImpl(region string, regionDeployType config.RegionDeployType, logger *logrus.Entry, ...)
- type DirectoryBasedTracker
- type ExecuteStepFunc
- type ExecuteTrackFunc
- type ExecuteTrackRegionFunc
- type Execution
- type ExecutionOutput
- type Output
- type RegionExecution
- type Stage
- type Track
- type Tracker
Constants ¶
const ( PRE_TRACK_NAME = "_pretrack" // The name of the directory for the pretrack DEFAULT_TRACK_NAME = "default" // The name of the default top-level track )
Variables ¶
This section is empty.
Functions ¶
func AppendTrackOutput ¶
func AppendTrackOutput(trackOutputVariables map[string]map[string]string, output config.StepOutput) map[string]map[string]string
Adds step outputs variables to the track output variables map K = Step Name, V = map[StepOutputVarName: StepOutputVarValue]
func ExecuteDeployTrack ¶
ExecuteDeployTrack is for executing a single track across regions
func ExecuteDeployTrackRegion ¶
func ExecuteDeployTrackRegion(in <-chan RegionExecution, out chan<- RegionExecution)
func ExecuteDestroyTrack ¶
ExecuteDestroyTrack is a helper function for destroying a track
func ExecuteDestroyTrackRegion ¶
func ExecuteDestroyTrackRegion(in <-chan RegionExecution, out chan<- RegionExecution)
Types ¶
type DirectoryBasedTracker ¶
DirectoryBasedTracker implements the Tracker interface
func (DirectoryBasedTracker) ExecuteTracks ¶
func (tracker DirectoryBasedTracker) ExecuteTracks(cfg config.Config) (output Stage)
ExecuteTracks executes all tracks in parallel. If a _pretrack exists, this is executed before all other tracks.
func (DirectoryBasedTracker) GatherTracks ¶
func (tracker DirectoryBasedTracker) GatherTracks(config config.Config) (tracks []Track)
GatherTracks gets all tracks that should be executed based on the directory structure
type ExecuteStepFunc ¶
type ExecuteStepFunc func(region string, regionDeployType config.RegionDeployType, entry *logrus.Entry, fs afero.Fs, defaultStepOutputVariables map[string]map[string]string, stepProgression int, s config.Step, out chan<- config.Step, destroy bool)
var ExecuteStep ExecuteStepFunc = ExecuteStepImpl
type ExecuteTrackFunc ¶
ExecuteTrackFunc facilitates track executions across multiple regions and RegionDeployTypes (e.g. Primary us-east-1 and regional us-*)
var DeployTrack ExecuteTrackFunc = ExecuteDeployTrack
var DestroyTrack ExecuteTrackFunc = ExecuteDestroyTrack
type ExecuteTrackRegionFunc ¶
type ExecuteTrackRegionFunc func(in <-chan RegionExecution, out chan<- RegionExecution)
ExecuteTrackRegionFunc executes a track within a single region and RegionDeployType (e.g. primary/us-east-1 or regional/us-east-2)
var DeployTrackRegion ExecuteTrackRegionFunc = ExecuteDeployTrackRegion
var DestroyTrackRegion ExecuteTrackRegionFunc = ExecuteDestroyTrackRegion
type ExecutionOutput ¶
type ExecutionOutput struct {
Name string
Dir string
ExecutedCount int
SkippedCount int
FailureCount int
FailedTestCount int
Steps map[string]config.Step
FailedSteps []config.Step
StepOutputVariables map[string]map[string]string // Output variables across all steps in the track. A map where K={step name} and V={map[outputVarName: outputVarVal]}
}
TrackOutput represents the output from a track execution
type Output ¶
type Output struct {
Name string
PrimaryStepOutputVariables map[string]map[string]string
Executions []RegionExecution
}
type RegionExecution ¶
type RegionExecution struct {
TrackName string
TrackDir string
TrackStepProgressionsCount int
TrackStepsWithTestsCount int
TrackOrderedSteps map[int][]config.Step
Logger *logrus.Entry
Fs afero.Fs
Output ExecutionOutput
Region string
RegionDeployType config.RegionDeployType
PrimaryOutput ExecutionOutput // This value is only set when regiondeploytype == regional
DefaultStepOutputVariables map[string]map[string]string
}
type Track ¶
type Track struct {
Name string
Dir string
StepProgressionsCount int
StepsCount int
StepsWithTestsCount int
StepsWithRegionalTestsCount int
RegionalDeployment bool // If true at least one step is configured to deploy to multiple region
OrderedSteps map[int][]config.Step
Output Output
DestroyOutput Output
IsPreTrack bool // If true, this is a PreTrack, meaning it should be run before all other tracks
IsDefaultTrack bool // If true, this track represents steps contained in a standalone, top-level track
Skipped bool // Indicates that the track was skipped. This will be for non-pretrack tracks if the pretrack fails
}
Track represents a delivery framework track (unit of functionality)