\PipelineStep
Represents a single step in a pipeline
Caveat inheritors: apparently PipelineStep must call their respective Pipeline's markFailed() function upon failure.
<code>
MyStep:
Class: ClassOfStep
NiceName: "Name of this step to display on frontend"
NiceDone: "Name of this step to display on frontend once finished"
</code>
Synopsis
class PipelineStep
extends DataObject
implements
PipelineData
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static string $default_sort = 'Order';
- private static array $summary_fields = ;
- protected $mergedConfig;
- // methods
- public string getTitle()
- public void getTreeTitle()
- public void getNiceName()
- public array getConfigData()
- public void setConfig()
- public string getRunningDescription()
- public mixed getConfigSetting()
- public void finish()
- public void markFailed()
- public boolean isQueued()
- public boolean isRunning()
- public boolean isFinished()
- public boolean isFailed()
- public boolean isAborted()
- public void log()
- protected DNEnvironment getDependentEnvironment()
- public boolean start()
- public boolean abort()
- public array allowedActions()
- public void getDryRun()
Hierarchy
Members
private
- $db — array
- $default_sort — string
- $has_one
- $summary_fields
protected
- $mergedConfig
—
array
Cached of config merged with defaults
Methods
protected
- getDependentEnvironment() — Tries to look up the value of the 'PerformTestOn' yml key for this step, and return the {@link DNEnvironment} that the key refers to, if set.
public
- abort() — Abort the step immediately, regardless of its current state, performing any cleanup necessary.
- allowedActions() — List of allowed actions the user is all allowed to take on this step
- finish()
- getConfigData() — Unserializes a snippet of configuration that was saved at the time this step was created at {@link Pipeline::start()} so that this step can use that configuration to determine what it needs to do. e.g for SmokeTestPipelineStep this might contain a list of URLs that need to be checked and which status codes to check for.
- getConfigSetting() — Retrieve the value of a specific config setting
- getDryRun()
- getNiceName()
- getRunningDescription() — Describe what the step is currently doing.
- getTitle() — Title of this step
- getTreeTitle()
- isAborted() — Determine if the step has been aborted (Aborted state).
- isFailed() — Determine if the step has failed on its own (Failed state). No further state transitions may occur.
- isFinished() — Determine if this step is in progress (Started state).
- isQueued() — Determine if this step is in progress (Started state).
- isRunning() — Determine if this step is in progress (Started state).
- log() — Log a message to the current log
- markFailed() — Fail this pipeline step
- setConfig()
- start() — Initialise the step unless it's already running (Started state).