Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
428e7e46
Commit
428e7e46
authored
Oct 13, 2020
by
Marcel Amirault
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add version details to CI Lint API doc
parent
864c7a2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
doc/api/lint.md
doc/api/lint.md
+8
-5
No files found.
doc/api/lint.md
View file @
428e7e46
...
...
@@ -6,7 +6,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# CI Lint API
## Validate the CI YAML config
## Validate the CI YAML config
uration
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/5953) in GitLab 8.12.
...
...
@@ -26,7 +26,7 @@ POST /ci/lint
curl
--header
"Content-Type: application/json"
"https://gitlab.example.com/api/v4/ci/lint"
--data
'{"content": "{ \"image\": \"ruby:2.6\", \"services\": [\"postgres\"], \"before_script\": [\"bundle install\", \"bundle exec rake db:create\"], \"variables\": {\"DB_NAME\": \"postgres\"}, \"types\": [\"test\", \"deploy\", \"notify\"], \"rspec\": { \"script\": \"rake spec\", \"tags\": [\"ruby\", \"postgres\"], \"only\": [\"branches\"]}}"}'
```
Be sure to paste the exact contents of your GitLab CI/CD YAML config because YAML
Be sure to paste the exact contents of your GitLab CI/CD YAML config
uration
because YAML
is very sensitive about indentation and spacing.
Example responses:
...
...
@@ -61,7 +61,10 @@ Example responses:
### YAML expansion
The expansion only works for CI configurations that don't have local
[
includes
](
../ci/yaml/README.md#include
)
.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/29568) in GitLab 13.5.
The CI lint returns an expanded version of the configuration. The expansion does not
work for CI configuration added with
[
`include: local`
](
../ci/yaml/README.md#includelocal
)
.
Example contents of a
`.gitlab-ci.yml`
passed to the CI Lint API with
`include_merged_yaml`
set as true:
...
...
@@ -119,7 +122,7 @@ curl "https://gitlab.example.com/api/v4/projects/:id/ci/lint"
Example responses:
-
Valid config:
-
Valid config
uration
:
```
json
{
...
...
@@ -130,7 +133,7 @@ Example responses:
}
```
-
Invalid config:
-
Invalid config
uration
:
```
json
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment