From 37311766b488a6325abd3a8f486072e0d0e6485c Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 19 Jul 2019 20:14:06 +0300 Subject: Add: controller /status, change how access control is done For reasons that I don't understand, the old way didn't work, as it resulted in all routes in Bottle being the same route. I think it's a bug in Bottle, but I didn't get to the root cause. Now it works by installing a Bottle plugin to do the access check. In some ways, it's a cleaner way, anyway. --- gitlab.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'gitlab.md') diff --git a/gitlab.md b/gitlab.md index 9dc2fa8..d3f7c6a 100644 --- a/gitlab.md +++ b/gitlab.md @@ -70,10 +70,29 @@ use them, and don't have to learn stuff to get started. * Simple HTTP API * Endpoint: POST /cd, body specifies which repo and ref to build and - deploy; queues the build + deploy; queues the build, the queued build will be visible via the + /status endpoint + + { + "repo": "...", + "ref": "..." + "artifact": "..." + } + * Endpoint: GET /status, which lists what jobs (posts to /cd) are queued, or running, or finished + { + "builds": [ + "id1": {"repo":"...", "ref":"...", "artifact":"..."}, + "id2": {"repo":"...", "ref":"...", "artifact":"..."}, + "id3": {"repo":"...", "ref":"...", "artifact":"..."}, + ] + "queued": ["id1", ...] + "building": ["id2", ...] + "finished": ["id3", ...] + } + ## VCS worker * Simple HTTP API -- cgit v1.2.1