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
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-09-13 22:12:41 +0300
committerRémy Coutable <remy@rymai.me>2016-09-13 22:12:41 +0300
commit5fdd92df39030ba4297189a274b8055fbca4b580 (patch)
treefd37d74d8bd1245991fe5864208bca80d412cff9 /doc
parent82b8cc5d66655605091b1fa089b6a3e946bd536d (diff)
parente940d97dc03e7876ecf07948736da4477d13ca80 (diff)
Merge branch 'feature/builds-register-change-404-to-204' into 'master'
Change response for /ci/api/v1/builds/register.json from 404 to 204 ## What does this MR do? To check if there are new builds scheduled for a runner, runner is sending `POST /ci/api/v1/builds/register.json` requests. If there is a build then a `200` response with build data is returned. However if there is no builds scheduled for this runner it receives a `404 Not Found` response. This may end with a lot of `404 Not Found` lines in logs that are an expected behavior (please read #14445 for a reference). Since `v1.0.1` version GitLab Runner is ready to receive a `204 No Content` response in case of no builds. This MR adds a support for this status code for each Runner's version that can be determined while handling `POST /ci/api/v1/builds/register.json` request. ## Are there points in the code the reviewer needs to double check? Specs in `spec/requests/ci/api/builds_spec.rb` ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] ~~API support added~~ - Tests - [x] Added for this feature/bug - [x] All builds are passing - [ ] ~~Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)~~ - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Fixes #14445 See merge request !6225
Diffstat (limited to 'doc')
-rw-r--r--doc/api/ci/builds.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/api/ci/builds.md b/doc/api/ci/builds.md
index 2a71b087f19..b6d79706a84 100644
--- a/doc/api/ci/builds.md
+++ b/doc/api/ci/builds.md
@@ -38,6 +38,15 @@ POST /ci/api/v1/builds/register
curl --request POST "https://gitlab.example.com/ci/api/v1/builds/register" --form "token=t0k3n"
```
+**Responses:**
+
+| Status | Data |Description |
+|--------|------|---------------------------------------------------------------------------|
+| `201` | yes | When a build is scheduled for a runner |
+| `204` | no | When no builds are scheduled for a runner (for GitLab Runner >= `v1.3.0`) |
+| `403` | no | When invalid token is used or no token is sent |
+| `404` | no | When no builds are scheduled for a runner (for GitLab Runner < `v1.3.0`) **or** when the runner is set to `paused` in GitLab runner's configuration page |
+
### Update details of an existing build
```