BuildDefinitions
Retrieves a list of build definitions, sliced across all projects.
Table Specific Information
Select
The cmdlet uses the Azure DevOps API to process WHERE clause conditions built with the following columns and operators:
- Id supports the '=,in' operators.
- ProjectId supports the '=' operator.
- Name supports the '=' operator.
- Path supports the '=' operator.
- ProcessType supports the '=' operator.
- ProcessYamlFileName supports the '=' operator.
- Properties supports the '=,in' operators.
- RepositoryId supports the '=' operator.
- RepositoryType supports the '=' operator.
- RevisionNum supports the '=' operator and filters the Revision column, but only when the Id is also specified.
- BuildDate supports the '<,<=,>,>=' operators.
- MinMetricsTime supports the '=' operator.
- IncludeLatestBuilds supports the '=' operator.
- TaskId supports the '=' operator.
- IncludeAllProperties supports the '=' operator.
For example:
SELECT * FROM BuildDefinitions WHERE ProjectId = '837ccd31-8159-4db3-b8ce-de0c36d2a0bf' SELECT * FROM BuildDefinitions WHERE ProjectId = '837ccd31-8159-4db3-b8ce-de0c36d2a0bf' AND Id IN (3, 4, 5) SELECT * FROM BuildDefinitions WHERE ProjectId = '837ccd31-8159-4db3-b8ce-de0c36d2a0bf' AND Path = '\"' SELECT * FROM BuildDefinitions WHERE Id = 298 AND RevisionNum = 1
Insert
The following is an example of inserting into BuildDefinitions table:
INSERT INTO BuildDefinitions (Name, ProjectId, RepositoryType, ProcessYamlFilename, RepositoryId, Tags) VALUES (cdata, 'b154d8f3-bfd9-4bfb-90ae-2e6c8cda8937', TfsGit, 'data.txt', 'e50698d4-bb6e-400f-a1a0-5f4d17517d9e', '1, 2, 3')
Update
The following is an example of updating a BuildDefinitions table:
UPDATE BuildDefinitions SET Name = 'Shubham1id', Revision = 1, RepositoryId = 'e50698d4-bb6e-400f-a1a0-5f4d17517d9e', RepositoryType = 'TfsGit', ProcessYamlFilename = 'data.txt' WHERE ProjectId = 'b154d8f3-bfd9-4bfb-90ae-2e6c8cda8937' AND Id = 4
Delete
The following is an example of deleting data in a BuildDefinitions table:
DELETE FROM BuildDefinitions WHERE ProjectId = 'b154d8f3-bfd9-4bfb-90ae-2e6c8cda8937' AND Id = 4
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | Integer | True |
Id of the build definition. | |
Links | String | True |
Aggregate of the reference links. | |
AuthoredByDisplayName | String | False |
This is the non-unique display name of the user. | |
AuthoredById | String | False |
Id of the user. | |
AuthoredByUrl | String | False |
The URL Of the user. | |
BadgeEnabled | Boolean | False |
Indicates whether the badge is enabled. | |
CreatedDate | Datetime | False |
The date this version of the definition was created. | |
DraftOfCreatedDate | Integer | False |
The date this version of the definition was created. | |
DraftOfId | Integer | False |
The Id of the referenced definition. | |
DraftOfName | String | False |
The name of the referenced definition. | |
DraftOfPath | String | False |
The folder path of the definition. | |
DraftOfProjectId | String | False |
Id of the Project of the referenced Definition. | |
DraftOfQueueStatus | String | False |
A value that indicates whether builds can be queued against this definition. | |
DraftOfRevision | Integer | False |
The definition revision number. | |
DraftOfType | String | False |
The type of the definition. | |
DraftOfUri | String | False |
The Definition's URI. | |
DraftOfUrl | String | False |
The REST URL of the definition. | |
JobAuthorizationScope | String | False |
The job authorization scope for builds queued against this definition. Only available if the filter IncludeAllProperties=true is set. | |
JobCancelTimeoutInMinutes | Integer | False |
The job cancel timeout (in minutes) for builds cancelled by user for this definition. Only available if the filter IncludeAllProperties=true is set. | |
JobTimeoutInMinutes | Integer | False |
The job execution timeout (in minutes) for builds queued against this definition. Only available if the filter IncludeAllProperties=true is set. | |
LatestBuildId | Integer | False |
Id of the latest build. | |
LatestCompletedBuildId | Integer | False |
Id of the latest completed build. | |
Name | String | False |
The name of the referenced definition. | |
Path | String | False |
The folder path of the definition. | |
ProcessType | Integer | False |
The process type. Only available if the filter IncludeAllProperties=true is set. | |
ProcessYamlFilename | String | False |
The process YAML file name. Only available if the filter IncludeAllProperties=true is set. | |
ProjectId | String | False |
Projects.Id |
Project identifier. |
Properties | String | False |
Properties of the build definition. Only available if the filter IncludeAllProperties=true is set. | |
Quality | String | False |
The quality of the definition document (draft, etc.). | |
QueueLinksSelfHref | String | True |
Queue self reference link. | |
QueueId | Integer | False |
The ID of the queue. | |
QueueName | String | False |
The name of the queue. | |
QueuePoolId | Integer | False |
The pool Id. | |
QueuePoolIsHosted | Boolean | False |
A value indicating whether or not this pool is managed by the service. | |
QueuePoolName | String | False |
The pool name. | |
QueueUrl | String | False |
The full http link to the resource. | |
QueueStatus | String | False |
A value that indicates whether builds can be queued against this definition. | |
RepositoryCheckoutSubmodules | Boolean | False |
Indicates whether to checkout submodules. Only available if the filter IncludeAllProperties=true is set. | |
RepositoryClean | String | False |
Indicates whether to clean the target folder when getting code from the repository. | |
RepositoryId | String | False |
The ID of the repository. Only available if the filter IncludeAllProperties=true is set. | |
RepositoryType | String | False |
The type of the repository. Only available if the filter IncludeAllProperties=true is set. | |
Revision | Integer | False |
The definition revision number. | |
Tags | String | False |
The tags associated with this definition. Only available if the filter IncludeAllProperties=true is set. | |
Triggers | String | False |
The build triggers. Only available if the filter IncludeAllProperties=true is set. | |
Type | String | False |
The type of the definition. | |
Uri | String | False |
The definition's URI. | |
Url | String | False |
The REST URL of the definition. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements, and offer a more granular control over the tuples that are returned from the data source. Unless otherwise specified, only the = operator is permitted when filtering on pseudocolumns.
Name | Type | Description |
RevisionNum | Integer |
The definition revision number, tied to the Revision. This filter is ignored if the Id is not specified. |
BuildDate | Datetime |
If specified, filters to definitions that have builds before or after this date. |
MinMetricsTime | Datetime |
If specified, indicates the date from which metrics should be included. |
IncludeLatestBuilds | Boolean |
Indicates whether latest builds should be included. |
TaskId | String |
If specified, filters to definitions that use the specified task. |
IncludeAllProperties | Boolean |
Indicates whether the full definitions should be returned. |