Build Object

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

Name Description Type Usage Example
BuildNumber A zero-based auto-incremented integer allocated to the current build (the first build will be build 0, the second build 1, etc) Integer $Build.BuildNumber$ 100
Created The date and time when the build was created DateTime $Build.Created$ "01/01/2019 5:03:18 PM"
Duration A set of time periods associated with the current build Build Durations $Build.Duration.Total$ "5 seconds"
ErrorAndWarningLogMessages * A list of error and warning messages in the build log Log Messages Collection $Build.ErrorAndWarningLogMessages.IsEmpty()$ True
FirstSharedResourceLabel A description of the first shared resource label acquired by the current build String $Build.FirstSharedResourceLabel$ "Server.Testing.Server.QuotaList.A: 1 read lock"
HasErroredStages Have any errors occurred in any stages of the current build? Boolean $Build.HasErroredStages$ False
HasFailedStages Have any stages of the current build failed? Boolean $Build.HasFailedStages$ False
HasNewChanges Is the current build associated with any new repository changesets which have not previously been built by another build for the same configuration? Boolean $Build.HasNewChanges$ True
HasSuccessfulStages Have any stages of the current build been successful? Boolean $Build.HasSuccessfulStages$ True
HasWarnings Have any warnings been logged during the current build? Boolean $Build.HasWarnings$ True
Id A unique integer allocated automatically to this build Integer $Build.Id$ 10
IssueIds A comma-delimited list of issue ids associated with the current build String $Build.IssueIds$ "123,234"
IsFeatureBranchBuild This expression is set to true when a build is triggered via a Repository Trigger on a non-default branch Boolean $Build.IsFeatureBranchBuild$ True
LastSharedResourceLabel A description of the most recent shared resource label acquired by the current build String $Build.LastSharedResourceLabel$ "Server.Testing.Server.QuotaList.B: 1 read lock"
LinkUrl The URL to the build details page String $Build.LinkUrl$ "http://servername/New_Project_1/ci/builds/view/123"
Metrics A reference object to access to any metrics recorded by build actions Metrics $Build.Metrics. See Metrics
Priority The priority given to the build when it was started ("Low", "Normal" or "High") String $Build.Priority$ "High"
SharedResourceLabels A comma-delimited list of shared resource labels acquired by the current build String $Build.SharedResourceLabels$ "Server.Testing.Server.QuotaList.A: 1 read lock", "Server.Testing.Server.QuotaList.B: 1 read lock"
SharedResources A list of shared resources acquired by the current build Shared Resources $Build.SharedResources. See Shared Resources
Stages A list of build stages Stages Collection $Build.Stages. See Stages Collection
StartComment The first comment logged during the build String $Build.StartComment$ "this is a comment"
Started The date and time when the first build stage started executing DateTime $Build.Started$ "01/01/2019 5:04:32 PM"
StartedBy A reference to the user who initiated the build User $Build.StartedBy$ "mr.twisted.buildstarter@http://finalbuilder.com"
StartedFromIPAddress The IP address of the client machine which the build was started from String $Build.StartedFromIPAddress$ "192.158.1.38"
TailLogMessages * The last fifty messages in the build log Log Messages Collection $Build.TailLogMessages.First().Type$ "Error"
Version A reference to the build version Version $Build.Version$ 1.1.2.333
  • ErrorAndWarningLogMessages and TailLogMessages are only available in build event handler fields.