Back to Gitlabhq

Pipelines

doc/user/glql/data_sources/pipelines.md

19.0.07.6 KB
Original Source

{{< details >}}

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

{{< /details >}}

{{< history >}}

  • Introduced in GitLab 18.11.
  • Fields commit, commitPath, refPath, stages, and user added in GitLab 18.11.

{{< /history >}}

[!note] Pipelines do not support sorting.

Allowed scopes

ScopeDescription
projectQuery pipelines in a specific project.

For more information, see scopes.

Query fields

FieldName (and alias)Operators
Authorauthor=
Refref=
Scopescope=
SHAsha=
Sourcesource=
Statusstatus=
Updated atupdated, updatedAt=, >, <, >=, <=

Author {#pipeline-author}

Description: Filter pipelines by the user who triggered them.

Allowed value types:

  • String
  • User (for example, @username)

Ref {#pipeline-ref}

Description: Filter pipelines by the Git ref (branch or tag name) they ran on.

Allowed value types: String

Scope {#pipeline-scope}

Description: Filter pipelines by their scope.

Allowed value types:

  • Enum, one of branches, tags, finished, pending, or running

SHA {#pipeline-sha}

Description: Filter pipelines by the commit SHA.

Allowed value types: String

Source {#pipeline-source}

Description: Filter pipelines by what triggered them.

Allowed value types: String

Status {#pipeline-status}

Description: Filter pipelines by their CI/CD status.

Allowed value types:

  • Enum, one of canceled, canceling, created, failed, manual, pending, preparing, running, scheduled, skipped, success, waiting_for_callback, or waiting_for_resource

Updated at {#pipeline-updated-at}

Description: Filter pipelines by when they were last updated.

Allowed value types:

  • AbsoluteDate (in the format YYYY-MM-DD)
  • RelativeDate (in the format <sign><digit><unit>, where sign is +, -, or omitted, digit is an integer, and unit is one of d (days), w (weeks), m (months) or y (years))

Notes:

  • For the = operator, the time range is considered from 00:00 to 23:59 in the user's time zone.
  • >= and <= operators are inclusive of the dates being queried, whereas > and < are not.

Display fields

FieldName (and alias)Description
ActiveactiveDisplay whether the pipeline is active
CancelablecancelableDisplay whether the pipeline can be canceled
ChildchildDisplay whether this is a child pipeline
CommitcommitDisplay commit details (ID, short ID, title, author name, web URL)
Commit pathcommitPathDisplay the path to the commit that triggered the pipeline
Committed atcommitted, committedAtDisplay the commit timestamp
CompletecompleteDisplay whether the pipeline is complete
Compute minutescomputeMinutesDisplay the compute minutes used
Config sourceconfigSourceDisplay the pipeline configuration source
CoveragecoverageDisplay code coverage percentage
Created atcreated, createdAtDisplay when the pipeline was created
DurationdurationDisplay the pipeline duration
Failed jobs countfailedJobsCountDisplay the number of failed jobs
Failure reasonfailureReasonDisplay the reason for pipeline failure
Finished atfinished, finishedAtDisplay when the pipeline finished
IDidDisplay the pipeline ID
IIDiidDisplay the pipeline internal ID
LatestlatestDisplay whether this is the latest pipeline for the ref
NamenameDisplay the pipeline name
PathpathDisplay the pipeline path
RefrefDisplay the Git ref (branch or tag)
Ref pathrefPathDisplay the path to the ref that triggered the pipeline
RetryableretryableDisplay whether the pipeline can be retried
SHAshaDisplay the commit SHA
SourcesourceDisplay what triggered the pipeline
StagesstagesDisplay pipeline stages (name and status)
Started atstarted, startedAtDisplay when the pipeline started
StatusstatusDisplay the pipeline status
StuckstuckDisplay whether the pipeline is stuck
Total jobstotalJobsDisplay the total number of jobs
Updated atupdated, updatedAtDisplay when the pipeline was last updated
UseruserDisplay the user who triggered the pipeline
WarningswarningsDisplay pipeline warnings
YAML errorsyamlErrorsDisplay whether the pipeline has YAML errors
YAML error messagesyamlErrorMessagesDisplay YAML error messages

Known issues

  • Queries with large date ranges can cause timeouts.

Examples

  • List all pipelines in the gitlab-org/gitlab project that failed today:

    yaml
    ```glql
    display: table
    fields: id, ref, status, startedAt
    query: type = Pipeline and project = "gitlab-org/gitlab" and status = failed and updated = today()
    ```
    
  • List all Duo agent pipelines in the gitlab-org/gitlab project:

    yaml
    ```glql
    display: table
    fields: id, ref, status, source, startedAt
    query: type = Pipeline and project = "gitlab-org/gitlab" and source = "duo_workflow"
    ```