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 |
this 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 |
HasNewChanges | Does Have any stages of the current build failed? | Boolean | $Build.HasFailedStages$ | False |
HasNewChanges | Is the current build associated with any new repository |
this build contain changesets which have not |
been associated with a previous buildpreviously been built by another build for the same configuration? | Boolean | $Build.HasNewChanges$ |
true | HasSuccessfulStages | HasWarnings | | 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 |
Integer 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. |
Id$10123,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 branch | Boolean | $Build.IsFeatureBranchBuild$ |
true | LastSharedResourceLabel | LinkUrl | | 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 |
Build details URL\\SERVERNAME\//servername/New_Project_1 |
\\\\ |
Metrics | A reference object |
to the metrics associated with this build (as defined below).Metrics | $Build.Metrics$ | N/A | 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 |
SharedResourceLabels | SharedResources | StartComment | StartedBy | The username of the user who initiated the build |
Stringpetertoms@buildstarter@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 |
object for (as defined below).N/A
- ErrorAndWarningLogMessages and TailLogMessages are only available in build event handler fields.