gitlab-org--gitlab-foss/doc/api/ci/ci_lint.md

46 lines
671 B
Markdown
Raw Normal View History

2016-08-31 09:16:25 +00:00
# Validate the .gitlab-ci.yaml
Check whether your .gitlab-ci.yml file is valid.
```
POST ci/lint
```
| Attribute | Type | Required | Description |
| ---------- | ------- | -------- | -------- |
| `content` | hash | yes | the .gitlab-ci.yaml content|
```bash
curl --request POST "https://gitlab.example.com/api/v3/ci/lint?content=YAML+Content"
```
Example response:
* valid content
```json
{
"status": "valid",
"errors": []
}
```
* invalid content
```json
{
"status": "invalid",
"errors": [
"variables config should be a hash of key value pairs"
]
}
```
* without the content attribute
```json
{
"error": "content is missing"
}
```