From 25ece82dab6de88a4d202ffc94a517f8d3e1d205 Mon Sep 17 00:00:00 2001 From: Katarzyna Kobierska Date: Thu, 1 Sep 2016 13:49:34 +0200 Subject: Rename file and update README --- doc/api/README.md | 2 +- doc/api/ci/README.md | 1 - doc/api/ci/ci_lint.md | 45 --------------------------------------------- doc/api/ci/lint.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 47 deletions(-) delete mode 100644 doc/api/ci/ci_lint.md create mode 100644 doc/api/ci/lint.md diff --git a/doc/api/README.md b/doc/api/README.md index 8c4f1b9c885..e12070dc1ce 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -43,6 +43,7 @@ following locations: - [Tags](tags.md) - [Todos](todos.md) - [Users](users.md) +- [Validate CI configuration](ci/lint.md) ### Internal CI API @@ -50,7 +51,6 @@ The following documentation is for the [internal CI API](ci/README.md): - [Builds](ci/builds.md) - [Runners](ci/runners.md) -- [Validate the .gitlab-ci.yaml](ci/ci_lint.md) ## Authentication diff --git a/doc/api/ci/README.md b/doc/api/ci/README.md index 8439598a5a8..96a281e27c8 100644 --- a/doc/api/ci/README.md +++ b/doc/api/ci/README.md @@ -22,4 +22,3 @@ GET /ci/api/v1/builds/:id/artifacts - [Builds](builds.md) - [Runners](runners.md) -- [Validate the .gitlab-ci.yaml](ci_lint.md) diff --git a/doc/api/ci/ci_lint.md b/doc/api/ci/ci_lint.md deleted file mode 100644 index 2b169176dd6..00000000000 --- a/doc/api/ci/ci_lint.md +++ /dev/null @@ -1,45 +0,0 @@ -# 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" -} -``` diff --git a/doc/api/ci/lint.md b/doc/api/ci/lint.md new file mode 100644 index 00000000000..876ee508474 --- /dev/null +++ b/doc/api/ci/lint.md @@ -0,0 +1,45 @@ +# Validate the .gitlab-ci.yml + +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" +} +``` -- cgit v1.2.1