Stage Object

The stage object $Stage provides access to the properties of the current stage. This is also used as a child object of the Stages Collection under the Build Object e.g. $Build.Stages.First().Name$

Name Description Type Usage Example
AgentName The host name of the agent that the current stage is running on. String $Stage.AgentName$ "ciagent01"
Elapsed The time period since the current stage was started. TimeSpan $Stage.Elapsed$ "00:10:01.7587427"
Finished The date/time when the current stage finished (if finished). DateTime $Stage.Finished$ "9/11/2018 10:44:54"
HasWarnings True if the current stage has warnings Boolean $Stage.HasWarnings$ False
IsError True if the current stage has errors Boolean $Stage.IsError$ False
IsFailure True if the current stage has failures Boolean $Stage.IsFailure$ False
IsSpecial True if the current stage is a special stage created to run pre- or post-stage events Boolean $Stage.IsSpecial$ False
IsSuccessful True if the current stage is successful Boolean $Stage.IsSuccessful$ True
Metrics The metrics associated with the current stage. Metrics $Stage.Metrics See Metrics
Name The name of the current stage as defined within the workflow editor. String $Stage.Name$ "Test Stage"
Order The running order of the current stage. Integer $Stage.Order$ 2
Started The date/time when the current stage was started. DateTime $Stage.Started$ "9/11/2018 10:34:53"