You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Used by Build object. Represents the collection of log messages in the parent object (i.e. build) and includes functions to select log messages in that collection. The log messages are sorted by date order.

Properties

NameDescriptionReturn TypeUsage Example
CountReturns the number of log messages in the collectionInteger$Build.ErrorAndWarningLogMessages.Count$3


Functions

Name and ParametersDescriptionReturn TypeUsage Example
First()Gets first log message from the collection.Stage$Build.ErrorAndWarningLogMessages.First().StageName$"Build"
First(string property, string operator, string value, bool ignoreCase)

Gets first matching log message from the collection for given property using given operator. See list of valid operators below.

Stage$Build.Stages.First("IsFailure", Equals, True).AgentName$"ciagent01"
IsEmpty()Returns true if collection is empty.Boolean $Build.ErrorAndWarningLogMessages.IsEmpty()$true
Item(integer index)Gets a log message in the collection by zero-based index number.Stage$Build.Stages.Item(1).Name$"Test"
Last()Gets last log message from the collection.Stage$Build.Stages.Last().Name$"Deploy"
Last(string property, string operator, string value, bool ignoreCase)Gets last matching log message 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 log messages from collection for given property using given operator. See list of valid operators below.Log Messages Collection$Build.Stages.Where("HasWarnings", Equals, True).Count$2


Operators

  • Equals
  • DoesNotEqual
  • Contains
  • DoesNotContain
  • StartsWith
  • DoesNotStartWith
  • EndsWith
  • DoesNotEndWith
  • IsRegexMatch
  • IsNotRegexMatch


  • No labels