summaryrefslogtreecommitdiff
path: root/yarns/400-build.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-04-23 13:27:22 +0300
committerLars Wirzenius <liw@liw.fi>2018-04-23 15:21:39 +0300
commit9d4e01e2df83a108c2c44cc4471666b5cecf4c36 (patch)
tree272049de3e1e30f67aee4ce6304c92e349bccea0 /yarns/400-build.yarn
parentde851333b5a0c90aa8cb7fb75e188b9e391b582d (diff)
downloadick2-9d4e01e2df83a108c2c44cc4471666b5cecf4c36.tar.gz
Change: all actions must have a "where"
Diffstat (limited to 'yarns/400-build.yarn')
-rw-r--r--yarns/400-build.yarn110
1 files changed, 64 insertions, 46 deletions
diff --git a/yarns/400-build.yarn b/yarns/400-build.yarn
index 796bd20..13257a0 100644
--- a/yarns/400-build.yarn
+++ b/yarns/400-build.yarn
@@ -47,8 +47,8 @@ Add up a project with some named pipelines.
... {
... "pipeline": "construct",
... "actions": [
- ... { "shell": "day 1" },
- ... { "shell": "day 2" }
+ ... { "where": "host", "shell": "day 1" },
+ ... { "where": "host", "shell": "day 2" }
... ]
... }
THEN result has status code 201
@@ -126,7 +126,8 @@ the worker to construct a new workspace for the build.
... "foo": "bar"
... },
... "step": {
- ... "action": "create_workspace"
+ ... "action": "create_workspace",
+ ... "where": "host"
... }
... }
@@ -143,7 +144,8 @@ the worker to construct a new workspace for the build.
... "foo": "bar"
... },
... "step": {
- ... "action": "create_workspace"
+ ... "action": "create_workspace",
+ ... "where": "host"
... }
... }
@@ -171,7 +173,8 @@ User can now see pipeline is running and which worker is building it.
... "foo": "bar"
... },
... "step": {
- ... "action": "create_workspace"
+ ... "action": "create_workspace",
+ ... "where": "host"
... }
... }
... }
@@ -188,9 +191,9 @@ User can now see pipeline is running and which worker is building it.
... "worker": "obelix",
... "project": "rome",
... "actions": [
- ... { "action": "create_workspace" },
- ... { "shell": "day 1" },
- ... { "shell": "day 2" }
+ ... { "where": "host", "action": "create_workspace" },
+ ... { "where": "host", "shell": "day 1" },
+ ... { "where": "host", "shell": "day 2" }
... ],
... "current_action": 0,
... "parameters": {
@@ -236,7 +239,8 @@ Worker requests more work, and gets the first actual build step.
... "foo": "bar"
... },
... "step": {
- ... "shell": "day 1"
+ ... "shell": "day 1",
+ ... "where": "host"
... }
... }
@@ -271,7 +275,8 @@ didnt't finish.
... "foo": "bar"
... },
... "step": {
- ... "shell": "day 1"
+ ... "shell": "day 1",
+ ... "where": "host"
... }
... }
@@ -315,9 +320,9 @@ The build status now shows the next step as the active one.
... "worker": "obelix",
... "project": "rome",
... "actions": [
- ... { "action": "create_workspace" },
- ... { "shell": "day 1" },
- ... { "shell": "day 2" }
+ ... { "where": "host", "action": "create_workspace" },
+ ... { "where": "host", "shell": "day 1" },
+ ... { "where": "host", "shell": "day 2" }
... ],
... "current_action": 2,
... "parameters": {
@@ -344,7 +349,8 @@ Now there's another step to do.
... "foo": "bar"
... },
... "step": {
- ... "shell": "day 2"
+ ... "shell": "day 2",
+ ... "where": "host"
... }
... }
@@ -364,7 +370,8 @@ User sees changed status.
... "foo": "bar"
... },
... "step": {
- ... "shell": "day 2"
+ ... "shell": "day 2",
+ ... "where": "host"
... },
... "log": "/logs/rome/1"
... }
@@ -411,9 +418,9 @@ no current action.
... "worker": "obelix",
... "project": "rome",
... "actions": [
- ... { "action": "create_workspace" },
- ... { "shell": "day 1" },
- ... { "shell": "day 2" }
+ ... { "where": "host", "action": "create_workspace" },
+ ... { "where": "host", "shell": "day 1" },
+ ... { "where": "host", "shell": "day 2" }
... ],
... "current_action": null,
... "parameters": {
@@ -434,9 +441,9 @@ no current action.
... "worker": "obelix",
... "project": "rome",
... "actions": [
- ... { "action": "create_workspace" },
- ... { "shell": "day 1" },
- ... { "shell": "day 2" }
+ ... { "where": "host", "action": "create_workspace" },
+ ... { "where": "host", "shell": "day 1" },
+ ... { "where": "host", "shell": "day 2" }
... ],
... "current_action": null,
... "parameters": {
@@ -469,7 +476,8 @@ Start build again. This should become build number 2.
... "foo": "bar"
... },
... "step": {
- ... "action": "create_workspace"
+ ... "action": "create_workspace",
+ ... "where": "host"
... }
... }
@@ -485,9 +493,9 @@ Start build again. This should become build number 2.
... "worker": "obelix",
... "project": "rome",
... "actions": [
- ... { "action": "create_workspace" },
- ... { "shell": "day 1" },
- ... { "shell": "day 2" }
+ ... { "where": "host", "action": "create_workspace" },
+ ... { "where": "host", "shell": "day 1" },
+ ... { "where": "host", "shell": "day 2" }
... ],
... "current_action": null,
... "parameters": {
@@ -502,9 +510,9 @@ Start build again. This should become build number 2.
... "worker": "obelix",
... "project": "rome",
... "actions": [
- ... { "action": "create_workspace" },
- ... { "shell": "day 1" },
- ... { "shell": "day 2" }
+ ... { "where": "host", "action": "create_workspace" },
+ ... { "where": "host", "shell": "day 1" },
+ ... { "where": "host", "shell": "day 2" }
... ],
... "current_action": 0,
... "parameters": {
@@ -540,7 +548,8 @@ Start build again. This should become build number 2.
... "foo": "bar"
... },
... "step": {
- ... "shell": "day 1"
+ ... "shell": "day 1",
+ ... "where": "host"
... }
... }
@@ -583,9 +592,9 @@ Start build again. This should become build number 2.
... "worker": "obelix",
... "project": "rome",
... "actions": [
- ... { "action": "create_workspace" },
- ... { "shell": "day 1" },
- ... { "shell": "day 2" }
+ ... { "where": "host", "action": "create_workspace" },
+ ... { "where": "host", "shell": "day 1" },
+ ... { "where": "host", "shell": "day 2" }
... ],
... "current_action": null,
... "parameters": {
@@ -600,9 +609,9 @@ Start build again. This should become build number 2.
... "worker": "obelix",
... "project": "rome",
... "actions": [
- ... { "action": "create_workspace" },
- ... { "shell": "day 1" },
- ... { "shell": "day 2" }
+ ... { "where": "host", "action": "create_workspace" },
+ ... { "where": "host", "shell": "day 1" },
+ ... { "where": "host", "shell": "day 2" }
... ],
... "current_action": null,
... "parameters": {
@@ -646,7 +655,7 @@ Add a couple of projects.
... {
... "pipeline": "do_something",
... "actions": [
- ... { "shell": "something" }
+ ... { "where": "host", "shell": "something" }
... ]
... }
THEN result has status code 201
@@ -684,7 +693,8 @@ Build the first project.
WHEN worker-manager makes request GET /work/obelix
THEN result is step
... {
- ... "action": "create_workspace"
+ ... "action": "create_workspace",
+ ... "where": "host"
... }
WHEN worker-manager makes request POST /work with a valid token and body
@@ -703,7 +713,8 @@ Build the first project.
WHEN worker-manager makes request GET /work/obelix
THEN result is step
... {
- ... "shell": "something"
+ ... "shell": "something",
+ ... "where": "host"
... }
WHEN worker-manager makes request POST /work with a valid token and body
@@ -731,7 +742,8 @@ Build second project.
WHEN worker-manager makes request GET /work/obelix
THEN result is step
... {
- ... "action": "create_workspace"
+ ... "action": "create_workspace",
+ ... "where": "host"
... }
WHEN worker-manager makes request POST /work with a valid token and body
@@ -749,7 +761,8 @@ Build second project.
WHEN worker-manager makes request GET /work/obelix
THEN result is step
... {
- ... "shell": "something"
+ ... "shell": "something",
+ ... "where": "host"
... }
WHEN worker-manager makes request POST /work with a valid token and body
@@ -802,7 +815,7 @@ Add a couple of projects.
... {
... "pipeline": "do_something",
... "actions": [
- ... { "shell": "something" }
+ ... { "where": "host", "shell": "something" }
... ]
... }
THEN result has status code 201
@@ -855,7 +868,8 @@ Trigger both projects.
WHEN asterix makes request GET /work/asterix
THEN result is step
... {
- ... "action": "create_workspace"
+ ... "action": "create_workspace",
+ ... "where": "host"
... }
WHEN user requests list of builds
@@ -868,7 +882,8 @@ Trigger both projects.
WHEN obelix makes request GET /work/obelix
THEN result is step
... {
- ... "action": "create_workspace"
+ ... "action": "create_workspace",
+ ... "where": "host"
... }
WHEN user requests list of builds
@@ -890,13 +905,15 @@ Trigger both projects.
WHEN asterix makes request GET /work/asterix
THEN result is step
... {
- ... "shell": "something"
+ ... "shell": "something",
+ ... "where": "host"
... }
WHEN obelix makes request GET /work/obelix
THEN result is step
... {
- ... "action": "create_workspace"
+ ... "action": "create_workspace",
+ ... "where": "host"
... }
WHEN obelix makes request POST /work with a valid token and body
@@ -915,7 +932,8 @@ Trigger both projects.
WHEN obelix makes request GET /work/obelix
THEN result is step
... {
- ... "shell": "something"
+ ... "shell": "something",
+ ... "where": "host"
... }
WHEN asterix makes request POST /work with a valid token and body