Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api/ci
diff options
context:
space:
mode:
authorKatarzyna Kobierska <kkobierska@gmail.com>2016-08-31 15:39:18 +0300
committerKatarzyna Kobierska <kkobierska@gmail.com>2016-09-07 13:10:49 +0300
commitea714b625b68b801275adcc9294bc3ada2bcd8fb (patch)
tree5d52131c06b2c1adf0f482593d3544b8b430ec63 /doc/api/ci
parentb63d20a1064c20204defd1d78af97893eb2b3fc8 (diff)
Move ci_lint to api/ci
Diffstat (limited to 'doc/api/ci')
-rw-r--r--doc/api/ci/README.md1
-rw-r--r--doc/api/ci/ci_lint.md45
2 files changed, 46 insertions, 0 deletions
diff --git a/doc/api/ci/README.md b/doc/api/ci/README.md
index 96a281e27c8..8439598a5a8 100644
--- a/doc/api/ci/README.md
+++ b/doc/api/ci/README.md
@@ -22,3 +22,4 @@ 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
new file mode 100644
index 00000000000..2b169176dd6
--- /dev/null
+++ b/doc/api/ci/ci_lint.md
@@ -0,0 +1,45 @@
+# 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"
+}
+```