diff options
Diffstat (limited to 'yarns/400-build.yarn')
-rw-r--r-- | yarns/400-build.yarn | 49 |
1 files changed, 11 insertions, 38 deletions
diff --git a/yarns/400-build.yarn b/yarns/400-build.yarn index c167ac2..4b3c085 100644 --- a/yarns/400-build.yarn +++ b/yarns/400-build.yarn @@ -74,11 +74,7 @@ Add a second project so we know each project gets its own work steps. ... } THEN result has status code 201 -There are no builds for the project yet, and is idle. - - WHEN user makes request GET /projects/rome/status - THEN result has status code 200 - AND body matches { "status": "idle" } +There are no builds yet. WHEN user makes request GET /builds THEN result has status code 200 @@ -95,14 +91,9 @@ Register a worker. ... } THEN result has status code 201 -Trigger build. First with an invalid status, then a real one. - - WHEN user makes request PUT /projects/rome/status - ... with a valid token and body { "status": "VANDALS!" } - THEN result has status code 400 +Trigger build. - WHEN user makes request PUT /projects/rome/status - ... with a valid token and body { "status": "triggered" } + WHEN user makes request GET /projects/rome/+trigger THEN result has status code 200 Worker wants work and gets the first step to run. If the worker asks @@ -150,13 +141,6 @@ the worker to construct a new workspace for the build. User can now see pipeline is running and which worker is building it. - WHEN user makes request GET /projects/rome/status - THEN result has status code 200 - AND body matches - ... { - ... "status": "building" - ... } - WHEN user makes request GET /workers/obelix THEN result has status code 200 AND body matches @@ -396,14 +380,8 @@ Now there's no more work to do. THEN result has status code 200 AND body matches {} -The pipeline status indicates success. - - WHEN user makes request GET /projects/rome/status - THEN result has status code 200 - AND body matches { "status": "idle" } - -Also, there's a build with a log. Also, the build status shows there's -no current action. +There's a build with a log. Also, the build status shows there's no +current action. WHEN user makes request GET /builds THEN result has status code 200 @@ -458,8 +436,7 @@ no current action. Start build again. This should become build number 2. - WHEN user makes request PUT /projects/rome/status - ... with a valid token and body { "status": "triggered" } + WHEN user makes request GET /projects/rome/+trigger THEN result has status code 200 WHEN obelix makes request GET /work @@ -684,8 +661,7 @@ Register a worker. Build the first project. - WHEN user makes request PUT /projects/first/status - ... with a valid token and body { "status": "triggered" } + WHEN user makes request GET /projects/first/+trigger THEN result has status code 200 WHEN obelix makes request GET /work @@ -733,8 +709,7 @@ Build the first project. Build second project. - WHEN user makes request PUT /projects/second/status - ... with a valid token and body { "status": "triggered" } + WHEN user makes request GET /projects/second/+trigger THEN result has status code 200 WHEN obelix makes request GET /work @@ -854,12 +829,11 @@ Register a couple of workers. Trigger both projects. - WHEN user makes request PUT /projects/first/status - ... with a valid token and body { "status": "triggered" } + WHEN user makes request GET /projects/first/+trigger THEN result has status code 200 WHEN user requests list of builds - THEN the list of builds is [] + THEN the list of builds is ["first/1"] WHEN asterix makes request GET /work THEN result is step @@ -871,8 +845,7 @@ Trigger both projects. WHEN user requests list of builds THEN the list of builds is ["first/1"] - WHEN user makes request PUT /projects/second/status - ... with a valid token and body { "status": "triggered" } + WHEN user makes request GET /projects/second/+trigger THEN result has status code 200 WHEN obelix makes request GET /work |