summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-11-05 20:23:21 +0100
committerLars Wirzenius <liw@liw.fi>2017-11-05 20:23:21 +0100
commitb995dfa59347fdc8a86fca174d31bcca77439c5a (patch)
tree8a5ec93bb5beac447fd04864cd457dd13832bc9a
parentce63c337d6f8357367efd730c373cd033a568181 (diff)
downloadick2-b995dfa59347fdc8a86fca174d31bcca77439c5a.tar.gz
Add: POST /work
-rw-r--r--ick2/controllerapi.py5
-rw-r--r--yarns/400-build.yarn4
2 files changed, 8 insertions, 1 deletions
diff --git a/ick2/controllerapi.py b/ick2/controllerapi.py
index b140ce5..5de2ad6 100644
--- a/ick2/controllerapi.py
+++ b/ick2/controllerapi.py
@@ -311,6 +311,11 @@ class WorkAPI(APIbase):
'path': '{}/<worker>'.format(path),
'callback': self.GET(self.get_work),
},
+ {
+ 'method': 'POST',
+ 'path': path,
+ 'callback': self.POST(self.update_work),
+ },
]
def get_work(self, worker):
diff --git a/yarns/400-build.yarn b/yarns/400-build.yarn
index 7632f00..30e47c6 100644
--- a/yarns/400-build.yarn
+++ b/yarns/400-build.yarn
@@ -66,6 +66,7 @@ Register a worker.
GIVEN an access token for worker-manager with scopes
... uapi_workers_post
+ ... uapi_work_post
WHEN worker-manager makes request POST /workers
... {
... "worker": "obelix"
@@ -127,6 +128,7 @@ User can now see pipeline is running and which worker is building it.
... {
... "worker": "obelix",
... "doing": {
+ ... "worker": "obelix",
... "project": "rome",
... "pipeline": "construct",
... "step_index": 0,
@@ -149,7 +151,7 @@ Worker reports some build output. Note the null exit code.
... "stderr": "",
... "timestamp": "2017-10-27T17:08:49"
... }
- THEN result has status code 200
+ THEN result has status code 201
AND body matches { "result": "waiting for more" }
Still the same job, since the first build step didnt't finish.