summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yarns/400-build.yarn29
1 files changed, 17 insertions, 12 deletions
diff --git a/yarns/400-build.yarn b/yarns/400-build.yarn
index 30e47c6..a316407 100644
--- a/yarns/400-build.yarn
+++ b/yarns/400-build.yarn
@@ -152,7 +152,6 @@ Worker reports some build output. Note the null exit code.
... "timestamp": "2017-10-27T17:08:49"
... }
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.
@@ -160,11 +159,13 @@ Still the same job, since the first build step didnt't finish.
THEN result has status code 200
AND body matches
... {
+ ... "worker": "obelix",
... "project": "rome",
... "pipeline": "construct",
... "step": {
... "shell": "day 1"
- ... }
+ ... },
+ ... "step_index": 0
... }
Report the step is done, and successfully.
@@ -179,8 +180,7 @@ Report the step is done, and successfully.
... "stderr": "",
... "timestamp": "2017-10-27T17:08:49"
... }
- THEN result has status code 200
- AND body matches { "result": "next step awaits you" }
+ THEN result has status code 201
Now there's another step to do.
@@ -188,24 +188,30 @@ Now there's another step to do.
THEN result has status code 200
AND body matches
... {
+ ... "worker": "obelix",
... "project": "rome",
... "pipeline": "construct",
... "step": {
... "shell": "day 2"
- ... }
+ ... },
+ ... "step_index": 1
... }
User sees changed status.
- WHEN user makes request GET /projects/rome/pipelines/construct
+ WHEN user makes request GET /workers/obelix
THEN result has status code 200
AND body matches
... {
- ... "status": "running",
... "worker": "obelix",
- ... "step_number": 2,
- ... "step": {
- ... "shell": "day 2"
+ ... "doing": {
+ ... "worker": "obelix",
+ ... "project": "rome",
+ ... "pipeline": "construct",
+ ... "step_index": 1,
+ ... "step": {
+ ... "shell": "day 2"
+ ... }
... }
... }
@@ -221,8 +227,7 @@ Report it done.
... "stderr": "",
... "timestamp": "2017-10-27T17:08:49"
... }
- THEN result has status code 200
- AND body matches { "result": "no more steps" }
+ THEN result has status code 201
Now there's no more work to do.