Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The build object $Build provides access to the properties of the current build.


NameDescriptionTypeUsage Example
BuildNumberA zero-based auto-incremented integer allocated to
this
the current build (the first build will be build 0, the second build 1, etc)Integer$Build.BuildNumber$100
CreatedThe date and time when the build was createdDateTime$Build.Created$"01/01/2019 5:03:18 PM"
DurationA set of time periods associated with the current buildBuild Durations$Build.Duration.Total$ "5 seconds"
ErrorAndWarningLogMessages *A list of error and warning messages in the build logLog Messages Collection$Build.ErrorAndWarningLogMessages.IsEmpty()$True
FirstSharedResourceLabelA description of the first shared resource label acquired by the current buildString$Build.FirstSharedResourceLabel$"Server.Testing.Server.QuotaList.A: 1 read lock"
HasErroredStagesHave any errors occurred in any stages of the current build?Boolean$Build.HasErroredStages$ False
HasFailedStagesHave any stages of the current build failed?Boolean$Build.HasFailedStages$False
HasNewChanges
Does this build contain
Is the current build associated with any new repository changesets which have not
been associated with a previous build
previously been built by another build for the same configuration?Boolean$Build.HasNewChanges$
trueHasSuccessfulStagesHasWarnings
True
HasSuccessfulStagesHave any stages of the current build been successful?Boolean$Build.HasSuccessfulStages$True
HasWarningsHave any warnings been logged during the current build?Boolean$Build.HasWarnings$ True
IdA unique
Integer
integer allocated automatically to this buildInteger$Build.Id$10
IssueIdsA comma-delimited list of issue ids associated with the current buildString$Build.
Id$
IssueIds$"
10
123,234"
IsFeatureBranchBuild
Utilised via build triggers.
This expression is set to true when a build is triggered via a Repository Trigger on a non-default branchBoolean$Build.IsFeatureBranchBuild$
trueLastSharedResourceLabelLinkUrl
True
LastSharedResourceLabelA description of the most recent shared resource label acquired by the current buildString$Build.LastSharedResourceLabel$"Server.Testing.Server.QuotaList.B: 1 read lock"
LinkUrlThe URL to the build details page
Build details URL
String$Build.LinkUrl$"http:
\\SERVERNAME\
//servername/New_Project_1
\
/ci
\
/builds
\
/view
\
/123"
 
MetricsA reference object to
the metrics associated with this build (as defined below).Metrics$Build.Metrics$N/A
access to any metrics recorded by build actionsMetrics$Build.Metrics.See Metrics
PriorityThe priority given to the build when it was started ("Low", "Normal" or "High")String$Build.Priority$"High"
SharedResourceLabelsA comma-delimited list of shared resource labels acquired by the current buildString$Build.SharedResourceLabels$"Server.Testing.Server.QuotaList.A: 1 read lock", "Server.Testing.Server.QuotaList.B: 1 read lock"
SharedResourcesA list of shared resources acquired by the current buildShared Resources$Build.SharedResources.See Shared Resources
StagesA list of build stages Stages Collection$Build.Stages.See Stages Collection
StartCommentThe first comment logged during the buildString$Build.StartComment$"this is a comment"
StartedThe date and time when the first build stage started executingDateTime$Build.Started$"01/01/2019 5:04:32 PM"
StartedByA reference to
SharedResourceLabelsSharedResourcesStartCommentStartedByThe username of
the user who initiated the build
String
User$Build.StartedBy$"
peter
mr.twisted.
toms@
buildstarter@finalbuilder.com"
StartedFromIPAddressThe IP address of the client machine which the build was started fromString$Build.StartedFromIPAddress$"192.158.1.38"
TailLogMessages *The last fifty messages in the build logLog Messages Collection$Build.TailLogMessages.First().Type$"Error"
VersionA reference
object for
to the build version
(as defined below).
Version$Build.Version$
N/A
1.1.2.333


  • ErrorAndWarningLogMessages and TailLogMessages are only available in build event handler fields.