gitlab_applicationgitlab_branchgitlab_commitgitlab_epicgitlab_groupgitlab_group_access_requestgitlab_group_hookgitlab_group_iterationgitlab_group_membergitlab_group_projectgitlab_group_push_rulegitlab_group_subgroupgitlab_group_variablegitlab_hookgitlab_instance_variablegitlab_issuegitlab_merge_requestgitlab_merge_request_changegitlab_my_eventgitlab_my_issuegitlab_my_projectgitlab_projectgitlab_project_access_requestgitlab_project_container_registrygitlab_project_deploymentgitlab_project_iterationgitlab_project_jobgitlab_project_membergitlab_project_pages_domaingitlab_project_pipelinegitlab_project_pipeline_detailgitlab_project_protected_branchgitlab_project_repositorygitlab_project_repository_filegitlab_project_variablegitlab_settinggitlab_snippetgitlab_usergitlab_user_eventgitlab_version
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_idfrom gitlab_project_deploymentwhere 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_idfrom gitlab_project_deploymentwhere 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.messagefrom gitlab_project_deployment d left outer join gitlab_commit c on d.project_id = c.project_id and d.deployable_commit_id = c.idwhere d.project_id = 14597683;
Schema for gitlab_project_deployment
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
created_at | timestamp with time zone | Timestamp of when the deployment was created. | |
deployable_commit_id | text | The ID of the commit for the deployable. | |
deployable_id | bigint | The ID of the deployable. | |
deployable_name | text | The name of the deployable. | |
deployable_pipeline_id | bigint | The ID of the pipeline for the deployable. | |
deployable_ref | text | The ref of the deployable. | |
deployable_stage | text | The stage of the deployable. | |
deployable_status | text | The status of the deployable. | |
environment_id | bigint | The ID of the environment the deployment is deployed to. | |
environment_name | text | The name of the environment the deployment is deployed to. | |
id | bigint | = | The ID of the deployment. |
iid | bigint | The internal ID of the deployment. | |
project_id | bigint | = | The ID of the project - link to `gitlab_project.id |
ref | text | The reference associated with the deployment (branch name or tag). | |
sha | text | The commit SHA at which the deployment was run against. | |
status | text | The status of the deployment (running/success/failed/canceled). | |
updated_at | timestamp with time zone | Timestamp of when the deployment was last updated. | |
user_id | bigint | The ID of the user whom triggered the deployment. | |
user_username | text | The username of the user whom triggered the deployment. |