...
Name and Parameters | Description | Return Type | Usage Example | |
---|---|---|---|---|
First() | Gets first stage from the collection | Stage | $Build.Stages.First().Name$ | "Build" |
First(string property, string operator, string value, bool ignoreCase) | Gets first matching stage from the collection for given property using given operator. See list of valid operators below. | Stage | $Build.Stages.First("IsFailure", Equals, True).AgentName$ | "ciagent01" |
Item(integer index) | Gets a stage in the collection by zero-based index number | Stage | $Build.Stages.Item(1).Name$ | "Test" |
Last() | Gets last stage from the collection | Stage | $Build.Stages.Last().Name$ | "Deploy" |
Last(string property, string operator, string value, bool ignoreCase) | Gets last matching stage from the collection for given property using given operator. See list of valid operators below. | Stage | $Build.Stages.Last("IsSuccessful", Equals, True).Finished$ | "13/11/2018 01:35:03" |
Select(string property) | Returns a string collection of property values | String Collection | $Build.Stage.Select(Name).Join(",")$ | "Build, Test, Deploy" |
Where(string property, string operator, string value, bool ignoreCase) | Gets matching stages from collection for given property using given operator. See list of valid operators below. | Stages Collection | $Build.Stages.Where("HasWarnings", Equals, True).Count$ | 2 |
...