Add pipeline name to GraphQL API
What does this MR do and why?
This MR updates the GraphQL API pipeline type to include the pipeline's name.
How to set up and validate locally
- Define a .gitlab-ci.yml file with a pipeline name, for example:
workflow:
name: 'Test pipeline for $CI_COMMIT_BRANCH'
test:
script: echo $CI_PIPELINE_NAME
- Run a pipeline using the CI config and verify in the UI that the pipeline was assigned a name
- In GraphQL explorer, run a query on the project's pipelines and include the name field. Example:
{
project(fullPath: "path/to/project") {
pipelines {
nodes {
id
name
sha
status
}
}
}
}
- Verify the name field is populated. Note: for pipelines with no name, the field will return a
null
value. Example:
{
"data": {
"project": {
"pipelines": {
"nodes": [
{
"id": "gid://gitlab/Ci::Pipeline/561",
"name": "Test pipeline for main",
"sha": "badacbd8cb09c4571f1b53988e6bbfb589f9e004",
"status": "CREATED"
}
]
}
}
}
}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Luke Stahlman