turbot/azuredevops
steampipe plugin install azuredevops

Table: azuredevops_build - Query Azure DevOps Builds using SQL

Azure DevOps is a Microsoft product that provides version control, reporting, requirements management, project management, automated builds, testing and release management capabilities. It covers the entire application lifecycle and enables DevOps capabilities. Azure DevOps can be used for a variety of application types.

Table Usage Guide

The azuredevops_build table provides insights into the builds within Azure DevOps. As a DevOps engineer, explore build-specific details through this table, including build status, the build process, and associated metadata. Utilize it to uncover information about builds, such as those with failed status, the details of the build process, and the verification of build metadata.

Examples

Basic info

Explore the various builds in your Azure DevOps project, identifying their quality, status, and priority. This can help you understand which builds are kept indefinitely and potentially streamline your project management efforts.

select
id,
build_number,
quality,
project_id,
status,
keep_forever,
priority
from
azuredevops_build;
select
id,
build_number,
quality,
project_id,
status,
keep_forever,
priority
from
azuredevops_build;

List postponed builds

Explore which build projects in Azure DevOps have been postponed. This is useful for prioritizing and managing development workflow.

select
id,
build_number,
quality,
project_id,
status,
keep_forever,
priority
from
azuredevops_build
where
status = 'postponed';
select
id,
build_number,
quality,
project_id,
status,
keep_forever,
priority
from
azuredevops_build
where
status = 'postponed';

List high priority builds

Determine the areas in which high priority builds are being used within your Azure DevOps projects. This can help prioritize resources and track project progress more effectively.

select
id,
build_number,
quality,
project_id,
status,
keep_forever,
priority
from
azuredevops_build
where
priority = 'high';
select
id,
build_number,
quality,
project_id,
status,
keep_forever,
priority
from
azuredevops_build
where
priority = 'high';

List builds which should be skipped by retention policies

Assess the elements within your Azure DevOps projects to pinpoint specific builds that have been marked to bypass retention policies. This can be beneficial for understanding which builds are being retained indefinitely, aiding in project management and resource allocation.

select
id,
build_number,
quality,
project_id,
status,
keep_forever,
priority
from
azuredevops_build
where
keep_forever;
select
id,
build_number,
quality,
project_id,
status,
keep_forever,
priority
from
azuredevops_build
where
keep_forever = 1;

List builds without repository

Analyze the settings to understand which Azure DevOps builds lack an associated repository. This can be useful for identifying potential configuration issues or orphaned builds.

select
id,
build_number,
quality,
project_id,
status,
keep_forever,
priority
from
azuredevops_build
where
repository_id is null;
select
id,
build_number,
quality,
project_id,
status,
keep_forever,
priority
from
azuredevops_build
where
repository_id is null;

List deleted builds

Explore which builds have been deleted in your Azure DevOps project. This can be useful for auditing purposes or for understanding the lifecycle of your builds.

select
id,
build_number,
quality,
project_id,
status,
keep_forever,
priority
from
azuredevops_build
where
deleted;
select
id,
build_number,
quality,
project_id,
status,
keep_forever,
priority
from
azuredevops_build
where
deleted = 1;

List builds associated with a particular project

Assess the elements within a specific project to identify the associated builds and their details, such as their quality, status, and priority. This can help in project management and in making decisions about resource allocation and task prioritization.

select
id,
build_number,
quality,
project_id,
status,
keep_forever,
priority
from
azuredevops_build
where
project ->> 'name' = 'private_project';
select
id,
build_number,
quality,
project_id,
status,
keep_forever,
priority
from
azuredevops_build
where
json_extract(project, '$.name') = 'private_project';

Schema for azuredevops_build

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
agent_specificationjsonbThe agent specification for the build.
build_numbertext=The build number/name of the build.
build_number_revisionbigintThe build number revision.
controllerjsonbThe build controller. This is only set if the definition type is Xaml.
definitionjsonbThe definition associated with the build.
deletedbooleanIndicates whether the build has been deleted.
deleted_byjsonbThe identity of the process or person that deleted the build.
deleted_datetimestamp with time zoneThe date the build was deleted.
deleted_reasontextThe description of how the build was deleted.
demandsjsonbA list of demands that represents the agent capabilities required by this build.
finish_timetimestamp with time zoneThe time that the build was completed.
idbigint=The ID of the build.
keep_foreverbooleanIndicates whether the build should be skipped by retention policies.
last_changed_byjsonbThe identity representing the process or person that last changed the build.
last_changed_datetimestamp with time zoneThe date the build was last changed.
linksjsonbThe class to represent a collection of REST reference links.
logsjsonbInformation about the build logs.
orchestration_planjsonbThe orchestration plan for the build.
organizationtext=, !=, ~~, ~~*, !~~, !~~*The name of the organization.
parameterstextThe parameters for the build.
plansjsonbOrchestration plans associated with the build (build, cleanup).
prioritytextThe build's priority.
projectjsonbThe team project.
project_idtext=ID of the project this build belongs to.
propertiesjsonbThe build properties.
qualitytextThe quality of the xaml build (good, bad, etc.).
queuejsonbThe queue. This is only set if the definition type is Build.
queue_optionstextAdditional options for queueing the build.
queue_positionbigintThe current position of the build in the queue.
queue_timetimestamp with time zoneThe time that the build was queued.
reasontext=The reason that the build was created.
repositoryjsonbThe repository.
repository_idtext=ID of the repository.
repository_typetext=Type of the repository.
requested_byjsonbThe identity that queued the build.
requested_forjsonbThe identity on whose behalf the build was queued.
resulttext=The build result.
retained_by_releasebooleanIndicates whether the build is retained by a release.
source_branchtextThe source branch.
source_versiontextThe source version.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
start_timetimestamp with time zoneThe time that the build was started.
statustext=The status of the build.
tagsjsonbThe build tags.
titletextTitle of the resource.
trigger_infojsonbSourceprovider-specific information about what triggered the build.
triggered_by_buildjsonbThe build that triggered this build via a Build completion trigger.
uritextThe URI of the build.
urltextThe REST URL of the build.
validation_resultsjsonbRepresents the result of validating a build request.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- azuredevops

You can pass the configuration to the command with the --config argument:

steampipe_export_azuredevops --config '<your_config>' azuredevops_build