Validate existing CI/CD configuration
GET
/api/v4/projects/{id}/ci/lint
Validates the .gitlab-ci.yml configuration for a specified project.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Query Parameters
Section titled “ Query Parameters ” sha
string
Deprecated: Use content_ref instead
content_ref
string
The CI/CD configuration content is taken from this commit SHA, branch or tag. Defaults to the HEAD of the project’s default branch
dry_run
boolean
Run pipeline creation simulation, or only do static check. This is false by default
include_jobs
boolean
If the list of jobs that would exist in a static check or pipeline simulation should be included in the response. This is false by default
ref
string
Deprecated: Use dry_run_ref instead
dry_run_ref
string
Branch or tag used as context when executing a dry run. Defaults to the default branch of the project. Only used when dry_run is true
Responses
Section titled “ Responses ”OK
Media type application/json
object
valid
boolean
errors
Array<string>
warnings
Array<string>
merged_yaml
string
includes
Array<object>
object
type
string
location
string
blob
string
raw
string
extra
object
context_project
string
context_sha
string
jobs
Array<object>
object
Example
{ "errors": [ "variables config should be a hash of key value pairs" ], "warnings": [ "jobs:job may allow multiple pipelines ..." ], "merged_yaml": "---\\n:another_test:\\n :stage: test\\n\n :script: echo 2\\n:test:\\n :stage: test\\n :script: echo 1\\n", "includes": [ { "blob": "https://gitlab.com/root/example-project/-/blob/..." } ], "jobs": [ { "name": "test", "script": [ "ls" ] } ]}Bad Request
Not found