steampipe plugin install theapsgroup/gitlab

Table: gitlab_project_deployment

The gitlab_project_deployment table can be used to obtain information about deployments associated with a specific project.

However, you must specify a project_id in the where or join clause.

Examples

List all deployments for a specific project

select
id,
iid,
ref,
sha,
status,
created_at,
updated_at,
user_id,
user_username,
environment_id,
environment_name,
deployable_id,
deployable_status,
deployable_stage,
deployable_name,
deployable_ref,
deployable_commit_id,
deployable_pipeline_id
from
gitlab_project_deployment
where
project_id = 14597683;

Get a specific deployment for a project

select
id,
iid,
ref,
sha,
status,
created_at,
updated_at,
user_id,
user_username,
environment_id,
environment_name,
deployable_id,
deployable_status,
deployable_stage,
deployable_name,
deployable_ref,
deployable_commit_id,
deployable_pipeline_id
from
gitlab_project_deployment
where
project_id = 14597683
and id = 1486132;

Get information about the commit associated with a specific deployment

select
d.id,
d.environment_name,
c.author_email,
c.short_id,
c.title,
c.message
from
gitlab_project_deployment d
left outer join gitlab_commit c on d.project_id = c.project_id
and d.deployable_commit_id = c.id
where
d.project_id = 14597683;

Schema for gitlab_project_deployment

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
created_attimestamp with time zoneTimestamp of when the deployment was created.
deployable_commit_idtextThe ID of the commit for the deployable.
deployable_idbigintThe ID of the deployable.
deployable_nametextThe name of the deployable.
deployable_pipeline_idbigintThe ID of the pipeline for the deployable.
deployable_reftextThe ref of the deployable.
deployable_stagetextThe stage of the deployable.
deployable_statustextThe status of the deployable.
environment_idbigintThe ID of the environment the deployment is deployed to.
environment_nametextThe name of the environment the deployment is deployed to.
idbigint=The ID of the deployment.
iidbigintThe internal ID of the deployment.
project_idbigint=The ID of the project - link to `gitlab_project.id
reftextThe reference associated with the deployment (branch name or tag).
shatextThe commit SHA at which the deployment was run against.
statustextThe status of the deployment (running/success/failed/canceled).
updated_attimestamp with time zoneTimestamp of when the deployment was last updated.
user_idbigintThe ID of the user whom triggered the deployment.
user_usernametextThe username of the user whom triggered the deployment.