From 5ae5a5362f9e9180291be71c50a5a39d07861cdc Mon Sep 17 00:00:00 2001 From: KX Date: Wed, 24 Apr 2024 10:19:28 +0200 Subject: [PATCH] vicky/docs: add lock documentation --- vicky/API.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/vicky/API.md b/vicky/API.md index 239c7c4..e3eaf9e 100644 --- a/vicky/API.md +++ b/vicky/API.md @@ -57,6 +57,47 @@ This API is an JSON API, therefore you need to set `Content-Type` header accordi } ``` +#### With Locks + +```json +{ + "display_name": "Deployment 3", + "locks": [ + { + "name": "anything", + "type": "WRITE" + } + ], + "flake_ref": { + "flake": "gitlab:wobcom/example", + "args": [] + } +} +``` + +```json +{ + "display_name": "Deployment 3", + "locks": [ + { + "name": "also_anything", + "type": "READ" + }, + { + "name": "also_anything", + "type": "READ" + }, + { + "name": "another_thing", + "type": "WRITE" + } + ], + "flake_ref": { + "flake": "gitlab:wobcom/example", + "args": [] + } +} +``` ### Claim A Task `POST /api/v1/tasks/claim` claims the next new task available.