ReleaseDefinitions
Retrieves a list of release definitions.
Table Specific Information
Select
The server uses the Azure DevOps API to process WHERE clause conditions built with the following columns and operators:
- Id supports the '=,in' operator.
- ProjectId supports the '=' operator.
- IsDeleted supports the '=' operator.
- Path supports the '=' operator.
- Properties supports the '=,in' operators.
- Tags supports the '=,in' operators.
- ArtifactSourceId supports the '=' operator.
- ArtifactType supports the '=' operator.
- Expand supports the '=' operator.
- IsExactNameMatch supports the '=' operator.
- SearchText supports the '=' operator.
- SearchTextContainsFolderName supports the '=' operator.
The rest of the filter is executed client-side in the server.
For example:
SELECT * FROM ReleaseDefinitions WHERE ProjectId = '1e313382-5f07-43be-b5ae-1dcfa51ffaf4'
SELECT * FROM ReleaseDefinitions WHERE ProjectId = '1e313382-5f07-43be-b5ae-1dcfa51ffaf4' AND Id = 1
SELECT * FROM ReleaseDefinitions WHERE ProjectId = '1e313382-5f07-43be-b5ae-1dcfa51ffaf4' AND Tags IN ('Tag1', 'Tag2')
SELECT * FROM ReleaseDefinitions WHERE ProjectId = '66eb7414-f622-4eff-88da-3ad681f19073' AND Expand = 'triggers'
Insert
When performing an Insert, the following fields are required: Name, Environments
The following is an example of inserting into the ReleaseDefinitions table:
INSERT INTO ReleaseDefinitionArtifacts#TEMP (Type, SourceId, Alias, IsPrimary, DefinitionReference) VALUES ('Build', '62d9f6e9-17ef-4cbf-833a-eb713c874df1:289', 'cdataa1', true, '{"artifactSourceDefinitionUrl":{"id":"https://dev.azure.com/cdata/_permalink/_build/index","name":""},"defaultVersionBranch":{"id":"","name":""},"defaultVersionSpecific":{"id":"","name":""},"defaultVersionTags":{"id":"","name":""},"defaultVersionType":{"id":"latestType","name":"Latest"},"definition":{"id":"289","name":"devops-driver-test"},"definitions":{"id":"","name":""},"IsMultiDefinitionType":{"id":"False","name":"False"},"project":{"id":"62d9f6e9-17ef-4cbf-833a-eb713c874df1","name":"devops-driver-test"},"repository":{"id":"","name":""}}')
INSERT INTO ReleaseDefinitions (Name, Comment, Description, Path, ReleaseNameFormat, ReleaseDefinitionArtifacts, Environments) VALUES ('cdatat', 'demo request to create release definitions', 'HelloCdata1', '/', 'Release', ReleaseDefinitionArtifacts#TEMP,
'{
\"name\": \"PROD\",
\"preDeployApprovals\": {
\"approvals\": [
{
\"rank\": 1,
\"isAutomated\": false,
\"isNotificationOn\": false,
\"approver\": {
\"displayName\": null,
\"id\": \"aeb95c63-4fac-4948-84ce-711b0a9dda97\"
},
\"id\": 0
}
]
},
\"postDeployApprovals\": {
\"approvals\": [
{
\"rank\": 1,
\"isAutomated\": true,
\"isNotificationOn\": false,
\"id\": 0
}
]
},
\"deployPhases\": [
{
\"deploymentInput\": {
\"parallelExecution\": {
\"parallelExecutionType\": \"none\"
},
\"skipArtifactsDownload\": false,
\"artifactsDownloadInput\": {},
\"demands\": [],
\"enableAccessToken\": false,
\"timeoutInMinutes\": 0,
\"jobCancelTimeoutInMinutes\": 1,
\"condition\": \"succeeded()\",
\"overrideInputs\": {}
},
\"rank\": 1,
\"phaseType\": \"agentBasedDeployment\",
\"name\": \"Run on agent\",
\"workflowTasks\": []
}
],
\"retentionPolicy\": {
\"daysToKeep\": 30,
\"releasesToKeep\": 3,
\"retainBuild\": true
}
}'
)
Update
The following is an example of updating the ReleaseDefinitions table:
UPDATE ReleaseDefinitions SET Name = 'cdata2' WHERE ProjectId = 'b154d8f3-bfd9-4bfb-90ae-2e6c8cda8937'
Delete
The following is an example of deleting data from the ReleaseDefinitions table:
DELETE FROM ReleaseDefinitions WHERE ProjectId = 'b154d8f3-bfd9-4bfb-90ae-2e6c8cda8937' AND Id = '1'
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | True |
Id of the release definition. | |
| Links | String | True |
Aggregate of the reference links. | |
| Comment | String | False |
Comment on the release definition. | |
| CreatedByDisplayName | String | False |
The non unique display name of the user who created this release definition. | |
| CreatedById | String | False |
The Id of the user. | |
| CreatedByUrl | String | False |
The URL of the user. | |
| CreatedOn | Datetime | False |
The date on which it got created. | |
| Description | String | False |
The description of the release definition. | |
| IsDeleted | Boolean | False |
Whether release definition is deleted. | |
| LastReleaseCreatedByDisplayName | String | False |
The non-unique display name of the user who created last release. | |
| LastReleaseCreatedById | String | False |
The Id of the user who created last release. | |
| LastReleaseCreatedByUrl | String | False |
The URL of the user who created last release. | |
| LastReleaseCreatedOn | Datetime | False |
The date on which the last release was created. | |
| LastReleaseDescription | String | False |
The description of the last release. | |
| LastReleaseId | Integer | False |
The Id of the last release. | |
| LastReleaseModifiedById | String | False |
The Id of the user who modified the last release. | |
| LastReleaseName | String | False |
The name of the last release. | |
| LastReleaseReason | String | False |
The reason of the last release. | |
| LastReleaseReleaseDefinitionId | Integer | False |
The Id of the release definition of the last release. | |
| LastReleaseWebAccessUri | String | False |
The web access URI of the last release. | |
| ModifiedByDisplayName | String | False |
The non-unique display name of the user who modified this release definition. | |
| ModifiedById | String | False |
The Id of the user who modified this release definition. | |
| ModifiedByUrl | String | False |
The URL of the user who modified this release definition. | |
| ModifiedOn | Datetime | False |
The date on which it got modified. | |
| Name | String | False |
The name of the release definition. | |
| Path | String | False |
The Path of the release definition. | |
| ProjectId | String | False |
Id of the Project. | |
| ProjectName | String | False |
Name of the Project. | |
| Properties | String | False |
The list of properties associated with this definition. | |
| ReleaseNameFormat | String | False |
The release name format. | |
| Revision | Integer | False |
The revision number. | |
| Source | String | False |
The source of the release definition. | |
| Tags | String | False |
The list of tags. | |
| Triggers | String | False |
The list of triggers. | |
| Url | String | False |
REST API URL to access the release definition. | |
| VariableGroups | String | False |
The list of variable groups. | |
| Variables | String | False |
Release Definition Variables. |
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 |
| ArtifactSourceId | String |
Release definitions with given artifactSourceId will be returned. |
| ArtifactType | String |
Release definitions with given artifactType will be returned. |
| Expand | String |
The properties that should be expanded in the list of Release definitions. The allowed values are tags, lastRelease, triggers, none. |
| IsExactNameMatch | Boolean |
'true' to gets the release definitions with exact match as specified in searchText. |
| SearchText | String |
Get release definitions with names containing searchText. |
| SearchTextContainsFolderName | Boolean |
'true' to get the release definitions under the folder with name as specified in searchText. |
| ReleaseDefinitionArtifacts | String |
List of artifacts for release definition object. |
| Environments | String |
List of environments for release definition object. |