project_pipelines
Gets or lists a project_pipelines resource.
Overview​
| Name | project_pipelines |
| Type | Resource |
| Id | gitlab.ci.project_pipelines |
Fields​
The following fields are returned by SELECT queries:
- list
GraphQL response envelope
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the pipeline. |
name | string | Name of the pipeline. |
active | boolean | Indicates if the pipeline is active. |
before_sha | string | Base SHA of the source branch. |
cancelable | boolean | Specifies if a pipeline can be canceled. |
child | boolean | If the pipeline is a child or not. |
commit_path | string | Path to the commit that triggered the pipeline. |
committed_at | string | Timestamp of the pipeline's commit. |
complete | boolean | Indicates if a pipeline is complete. |
compute_minutes | number | Total minutes consumed by the pipeline. |
config_source | string | Configuration 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) |
coverage | number | Coverage percentage. |
created_at | string | Timestamp of the pipeline's creation. |
duration | integer | Duration of the pipeline in seconds. |
failed_jobs_count | integer | Number of failed jobs in the pipeline, including trigger jobs and external jobs. |
failure_reason | string | Reason why the pipeline failed. |
finished_at | string | Timestamp of the pipeline's completion. |
has_manual_actions | boolean | Indicates if the pipeline has manual actions. |
has_scheduled_actions | boolean | Indicates if the pipeline has scheduled actions. |
iid | string | Internal ID of the pipeline. |
latest | boolean | If the pipeline is the latest one or not. |
merge_request_event_type | string | Event type of the pipeline associated with a merge request. (MERGED_RESULT, DETACHED, MERGE_TRAIN) |
path | string | Relative path to the pipeline's page. |
project | object | Project identity (id, full_path, name) |
queued_duration | string | How long the pipeline was queued before starting. |
ref | string | Reference to the branch from which the pipeline was triggered. |
ref_path | string | Reference path to the branch from which the pipeline was triggered. |
ref_text | string | Reference text from the presenter. |
retryable | boolean | Specifies if a pipeline's jobs can be retried. |
sha | string | SHA of the pipeline's commit. |
source | string | Source of the pipeline. |
started_at | string | Timestamp when the pipeline was started. |
status | string | Status 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) |
stuck | boolean | If the pipeline is stuck. |
total_jobs | integer | Total number of jobs in the pipeline. |
trigger | boolean | If the pipeline was created by a Trigger request. |
triggered_by_path | string | Path that triggered the pipeline. |
troubleshoot_job_with_ai | boolean | If the user can troubleshoot jobs of a pipeline. |
type | string | Type of the pipeline. |
updated_at | string | Timestamp of the pipeline's last activity. |
user | object | UserCore identity (id, username, name) |
uses_needs | boolean | Indicates if the pipeline has jobs with needs dependencies. |
warnings | boolean | Indicates if a pipeline has warnings. |
yaml_error_messages | string | Pipeline YAML errors. |
yaml_errors | boolean | If the pipeline has YAML errors. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | full_path, host | ref, ref_type, scope, sha, source, status, updated_after, updated_before, username | Pipelines 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.
| Name | Datatype | Description |
|---|---|---|
full_path | string | Full path of the project, for example gitlab-org/gitlab |
host | string | GitLab 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) |
ref | string | Filter pipelines by the ref they are run for. |
ref_type | string | Type of ref. |
scope | string | Filter pipelines by scope. |
sha | string | Filter pipelines by the sha of the commit they are run for. |
source | string | Filter pipelines by their source. |
status | string | Filter pipelines by their status. |
updated_after | string | Pipelines updated after the date. |
updated_before | string | Pipelines updated before the date. |
username | string | Filter pipelines by the user that triggered the pipeline. |
SELECT examples​
- list
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 }}'
;