Skip to main content

project_pipelines

Gets or lists a project_pipelines resource.

Overview​

Nameproject_pipelines
TypeResource
Idgitlab.ci.project_pipelines

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
idstringID of the pipeline.
namestringName of the pipeline.
activebooleanIndicates if the pipeline is active.
before_shastringBase SHA of the source branch.
cancelablebooleanSpecifies if a pipeline can be canceled.
childbooleanIf the pipeline is a child or not.
commit_pathstringPath to the commit that triggered the pipeline.
committed_atstringTimestamp of the pipeline's commit.
completebooleanIndicates if a pipeline is complete.
compute_minutesnumberTotal minutes consumed by the pipeline.
config_sourcestringConfiguration source of the pipeline (UNKNOWN_SOURCE, REPOSITORY_SOURCE, AUTO_DEVOPS_SOURCE, WEBIDE_SOURCE, REMOTE_SOURCE, EXTERNAL_PROJECT_SOURCE, BRIDGE_SOURCE, PARAMETER_SOURCE, COMPLIANCE_SOURCE, SECURITY_POLICIES_DEFAULT_SOURCE, PIPELINE_EXECUTION_POLICY_FORCED, SECURITY_SCAN_PROFILES_SOURCE) (UNKNOWN_SOURCE, REPOSITORY_SOURCE, AUTO_DEVOPS_SOURCE, WEBIDE_SOURCE, REMOTE_SOURCE, EXTERNAL_PROJECT_SOURCE, BRIDGE_SOURCE, PARAMETER_SOURCE, COMPLIANCE_SOURCE, SECURITY_POLICIES_DEFAULT_SOURCE, PIPELINE_EXECUTION_POLICY_FORCED, SECURITY_SCAN_PROFILES_SOURCE)
coveragenumberCoverage percentage.
created_atstringTimestamp of the pipeline's creation.
durationintegerDuration of the pipeline in seconds.
failed_jobs_countintegerNumber of failed jobs in the pipeline, including trigger jobs and external jobs.
failure_reasonstringReason why the pipeline failed.
finished_atstringTimestamp of the pipeline's completion.
has_manual_actionsbooleanIndicates if the pipeline has manual actions.
has_scheduled_actionsbooleanIndicates if the pipeline has scheduled actions.
iidstringInternal ID of the pipeline.
latestbooleanIf the pipeline is the latest one or not.
merge_request_event_typestringEvent type of the pipeline associated with a merge request. (MERGED_RESULT, DETACHED, MERGE_TRAIN)
pathstringRelative path to the pipeline's page.
projectobjectProject identity (id, full_path, name)
queued_durationstringHow long the pipeline was queued before starting.
refstringReference to the branch from which the pipeline was triggered.
ref_pathstringReference path to the branch from which the pipeline was triggered.
ref_textstringReference text from the presenter.
retryablebooleanSpecifies if a pipeline's jobs can be retried.
shastringSHA of the pipeline's commit.
sourcestringSource of the pipeline.
started_atstringTimestamp when the pipeline was started.
statusstringStatus of the pipeline (CREATED, WAITING_FOR_RESOURCE, PREPARING, WAITING_FOR_CALLBACK, PENDING, RUNNING, FAILED, SUCCESS, CANCELED, CANCELING, SKIPPED, MANUAL, SCHEDULED) (CREATED, WAITING_FOR_RESOURCE, PREPARING, WAITING_FOR_CALLBACK, PENDING, RUNNING, FAILED, SUCCESS, CANCELING, CANCELED, SKIPPED, MANUAL, SCHEDULED)
stuckbooleanIf the pipeline is stuck.
total_jobsintegerTotal number of jobs in the pipeline.
triggerbooleanIf the pipeline was created by a Trigger request.
triggered_by_pathstringPath that triggered the pipeline.
troubleshoot_job_with_aibooleanIf the user can troubleshoot jobs of a pipeline.
typestringType of the pipeline.
updated_atstringTimestamp of the pipeline's last activity.
userobjectUserCore identity (id, username, name)
uses_needsbooleanIndicates if the pipeline has jobs with needs dependencies.
warningsbooleanIndicates if a pipeline has warnings.
yaml_error_messagesstringPipeline YAML errors.
yaml_errorsbooleanIf the pipeline has YAML errors.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectfull_path, hostref, ref_type, scope, sha, source, status, updated_after, updated_before, usernamePipelines of the project. Generated from the GitLab GraphQL schema field Project.pipelines (connection of Pipeline nodes).

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
full_pathstringFull path of the project, for example gitlab-org/gitlab
hoststringGitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST)
refstringFilter pipelines by the ref they are run for.
ref_typestringType of ref.
scopestringFilter pipelines by scope.
shastringFilter pipelines by the sha of the commit they are run for.
sourcestringFilter pipelines by their source.
statusstringFilter pipelines by their status.
updated_afterstringPipelines updated after the date.
updated_beforestringPipelines updated before the date.
usernamestringFilter pipelines by the user that triggered the pipeline.

SELECT examples​

Pipelines of the project. Generated from the GitLab GraphQL schema field Project.pipelines (connection of Pipeline nodes).

SELECT
id,
name,
active,
before_sha,
cancelable,
child,
commit_path,
committed_at,
complete,
compute_minutes,
config_source,
coverage,
created_at,
duration,
failed_jobs_count,
failure_reason,
finished_at,
has_manual_actions,
has_scheduled_actions,
iid,
latest,
merge_request_event_type,
path,
project,
queued_duration,
ref,
ref_path,
ref_text,
retryable,
sha,
source,
started_at,
status,
stuck,
total_jobs,
trigger,
triggered_by_path,
troubleshoot_job_with_ai,
type,
updated_at,
user,
uses_needs,
warnings,
yaml_error_messages,
yaml_errors
FROM gitlab.ci.project_pipelines
WHERE full_path = '{{ full_path }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
AND ref = '{{ ref }}'
AND ref_type = '{{ ref_type }}'
AND scope = '{{ scope }}'
AND sha = '{{ sha }}'
AND source = '{{ source }}'
AND status = '{{ status }}'
AND updated_after = '{{ updated_after }}'
AND updated_before = '{{ updated_before }}'
AND username = '{{ username }}'
;