steampipe plugin install theapsgroup/gitlab

Table: gitlab_project_job

The gitlab_project_job table can be used to query information about jobs on a specific project.

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

Examples

  • List jobs for a project (adding limit is highly recommended):
select
*
from
gitlab_project_job
where
project_id = '123'
limit
10;
  • List jobs where name contains deploy string:
select
*
from
gitlab_project_job
where
project_id = '123'
and name like '%deploy%'
limit
10;

Reference

Schema for gitlab_project_job

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
allow_failurebooleanIndicates if the job is allowed to fail and allow the pipeline to proceed.
artifactsjsonbAn array of artifact information
commit_idtextThe ID of the commit.
commit_short_idtextThe short ID of the commit.
created_attimestamp with time zoneTimestamp of when the job was created.
durationdouble precisionRunning duration of the job (seconds).
failure_reasontextThe reason for the job's failure (if failed).
finished_attimestamp with time zoneTimestamp of when the job finished.
idbigintThe ID of the job.
nametextThe Name of the job.
pipeline_idbigintThe ID of the pipeline which the jobs belongs to - link `gitlab_pipeline.id`.
pipeline_project_idbigintThe ID of the project to which the pipeline belongs - link `gitlab_project.id`.
pipeline_reftextThe ref of the pipeline.
pipeline_shatextThe sha of the commit the pipeline ran against.
pipeline_statustextThe status of the pipeline.
project_idbigint=The ID of the project the job was run against - link `gitlab_project.id`.
queued_durationdouble precisionDuration in seconds the job was queued before running.
reftextThe reference associated with the pipeline (branch name or tag).
runner_activebooleanIndicates if the runner is active.
runner_descriptiontextThe description of the runner assigned to the job.
runner_idbigintThe ID of the runner assigned to the job.
runner_is_sharedbooleanIndicates if the runner is shared.
runner_nametextThe name of the runner assigned to the job.
stagetextThe stage of the job (build/test/staging/production).
started_attimestamp with time zoneTimestamp of when the job was started.
statustextThe status of the job (success/failed/canceled).
tagbooleanIndicates if the job was started by a tag.
tracetextThe trace (aka log) of the job.
user_idbigintThe ID of the user who triggered the job - link to `gitlab_user.ID`.
user_nametextThe display name of the user who triggered the job.
usernametextThe username of the user who triggered the job - link to `gitlab_user.username`.
web_urltextThe url to view the job.