
GitLab Pipelines List
CertifiedList GitLab CI/CD pipelines
GitLab Pipelines List
List GitLab CI/CD pipelines
Lists the pipelines of a project, newest first, filtered by status, ref, commit, source or update time. Returns the first pipeline (FETCH_ONE), every pipeline (FETCH), an internal storage file written page by page (STORE), or only the number of pipelines found (NONE).
type: io.kestra.plugin.gitlab.pipelines.ListExamples
List the failed pipelines of the last day.
id: gitlab_failed_pipelines
namespace: company.team
tasks:
- id: list_failed
type: io.kestra.plugin.gitlab.pipelines.List
token: "{{ secret('GITLAB_TOKEN') }}"
projectId: "12345"
status: FAILED
updatedAfter: "{{ now() | dateAdd(-1, 'DAYS') }}"
- id: log_results
type: io.kestra.plugin.core.log.Log
message: "Found {{ outputs.list_failed.size }} failed pipelines"
Store the last 500 pipelines of main in an internal storage file.
id: gitlab_pipeline_history
namespace: company.team
tasks:
- id: list_main
type: io.kestra.plugin.gitlab.pipelines.List
token: "{{ secret('GITLAB_TOKEN') }}"
projectId: "12345"
ref: main
limit: 500
fetchType: STORE
Read the latest scheduled pipeline of main.
id: gitlab_latest_scheduled_pipeline
namespace: company.team
tasks:
- id: latest_scheduled
type: io.kestra.plugin.gitlab.pipelines.List
token: "{{ secret('GITLAB_TOKEN') }}"
projectId: "12345"
ref: main
source: SCHEDULE
orderBy: UPDATED_AT
fetchType: FETCH_ONE
- id: log_latest
type: io.kestra.plugin.core.log.Log
message: "Latest scheduled pipeline: {{ outputs.latest_scheduled.row.webUrl }}"
Properties
projectId *string
Project ID or path
Numeric project ID or URL-encoded project path rendered from the context to build API endpoints.
token *string
Access token used for API calls
GitLab Personal/Project/Group Access Token sent as the PRIVATE-TOKEN header; requires scopes that cover the requested API operations. See the GitLab Authentication docs.
apiPath string
/api/v4/projectsProjects API path
Projects API prefix appended before the project ID; defaults to /api/v4/projects. Override when fronting GitLab with a proxy or custom base path.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150fetchType string
FETCHSTOREFETCHFETCH_ONENONEFetch type
FETCH_ONE returns the first pipeline in the row output, FETCH (the default) returns every pipeline in the pipelines output, STORE writes them page by page to an internal storage file returned as uri, and NONE only returns their number in size.
limit integerstring
20Maximum number of pipelines
Pages through the API, 100 pipelines per request, until this many pipelines are read. Defaults to 20; must be between 1 and 10000. Ignored with fetchType: FETCH_ONE, which reads a single pipeline.
orderBy string
IDIDSTATUSREFUPDATED_ATUSER_IDOrder by
Sort field, newest first: ID (the default), STATUS, REF, UPDATED_AT or USER_ID.
ref string
Ref filter
Only pipelines of this branch or tag.
sha string
Commit SHA filter
Only pipelines of this commit.
source string
PUSHWEBTRIGGERSCHEDULEAPIEXTERNALPIPELINECHATWEBIDEMERGE_REQUEST_EVENTEXTERNAL_PULL_REQUEST_EVENTPARENT_PIPELINEONDEMAND_DAST_SCANONDEMAND_DAST_VALIDATIONSECURITY_ORCHESTRATION_POLICYSource filter
Only pipelines started by this source, for example PUSH, WEB, API, SCHEDULE or MERGE_REQUEST_EVENT.
status string
CREATEDWAITING_FOR_RESOURCEPREPARINGPENDINGRUNNINGCANCELINGSUCCESSFAILEDCANCELEDSKIPPEDMANUALSCHEDULEDStatus filter
Only pipelines with this status, for example RUNNING, SUCCESS, FAILED or CANCELED.
updatedAfter string
Updated after
Only pipelines updated after this ISO 8601 date-time.
url string
https://gitlab.comGitLab API base URL
Base URL of the GitLab instance; defaults to https://gitlab.com. Override for self-hosted installations.
Outputs
pipelines array
Pipelines
The pipelines found, newest first, when fetchType is FETCH.
io.kestra.plugin.gitlab.pipelines.Pipeline
date-timeCreation time
Duration in seconds
Time the pipeline spent running; empty while it is still running.
date-timeFinish time
Empty while the pipeline is still running.
Pipeline ID
Global ID of the pipeline, used in the pipeline API endpoints.
Pipeline IID
ID of the pipeline within its project, as shown in the GitLab UI (#12).
Project ID
Numeric ID of the project the pipeline belongs to.
Git ref
Branch or tag the pipeline runs for.
Commit SHA
SHA of the commit the pipeline runs for.
Pipeline source
What started the pipeline, for example push, web, api, schedule or merge_request_event.
date-timeStart time
Empty while the pipeline has not started.
Pipeline status
One of created, waiting_for_resource, preparing, pending, running, canceling, success, failed, canceled, skipped, manual or scheduled.
date-timeLast update time
Pipeline URL
Link to the pipeline in the GitLab UI.
row
First pipeline
The first pipeline found when fetchType is FETCH_ONE; empty when no pipeline matches.
io.kestra.plugin.gitlab.pipelines.Pipeline
date-timeCreation time
Duration in seconds
Time the pipeline spent running; empty while it is still running.
date-timeFinish time
Empty while the pipeline is still running.
Pipeline ID
Global ID of the pipeline, used in the pipeline API endpoints.
Pipeline IID
ID of the pipeline within its project, as shown in the GitLab UI (#12).
Project ID
Numeric ID of the project the pipeline belongs to.
Git ref
Branch or tag the pipeline runs for.
Commit SHA
SHA of the commit the pipeline runs for.
Pipeline source
What started the pipeline, for example push, web, api, schedule or merge_request_event.
date-timeStart time
Empty while the pipeline has not started.
Pipeline status
One of created, waiting_for_resource, preparing, pending, running, canceling, success, failed, canceled, skipped, manual or scheduled.
date-timeLast update time
Pipeline URL
Link to the pipeline in the GitLab UI.
size integer
Number of pipelines
Number of pipelines read, for every fetchType.
uri string
uriStored pipelines
Internal storage URI of an ION file with one pipeline per row, when fetchType is STORE.