diff --git a/databuild.schema.json b/databuild.schema.json index 07377f8..a9e3bfc 100644 --- a/databuild.schema.json +++ b/databuild.schema.json @@ -26,7 +26,7 @@ "JobConfig": { "type": "object", - "required": ["outputs", "inputs", "executable"], + "required": ["outputs", "inputs","args","env"], "properties": { "outputs": { "type": "array", @@ -47,10 +47,6 @@ "type": "object", "additionalProperties": { "type": "string" }, "description": "Environment variables" - }, - "executable": { - "type": "string", - "description": "Path to executable that will be run" } } }, diff --git a/examples/hello_world/README.md b/examples/hello_world/README.md new file mode 100644 index 0000000..784f9af --- /dev/null +++ b/examples/hello_world/README.md @@ -0,0 +1,22 @@ + +# Hello World + +Demonstrates a simple parameterized job. + +## Configure + +```bash +$ bazel run //:test_job.cfg test_output +{"outputs":["test_output"],"inputs":[],"args":["will", "build", "test_output"],"env":{"foo":"bar"}} +``` + +## Execute + +Doesn't actually write an output. + +```bash +$ bazel run //:test_job.cfg test_output | bazel run //:test_job +EXECUTE! +foo=bar +args=will build test_output +``` diff --git a/examples/hello_world/configure.sh b/examples/hello_world/configure.sh index 7f9e902..727014c 100755 --- a/examples/hello_world/configure.sh +++ b/examples/hello_world/configure.sh @@ -1,2 +1,2 @@ # Create a test job config -echo "{\"outputs\":[\"$1\"],\"inputs\":[],\"args\":[\"arg1\", \"arg2\"],\"env\":{\"foo\":\"bar\"},\"executable\":\"TODO\"}" +echo "{\"outputs\":[\"$1\"],\"inputs\":[],\"args\":[\"will\", \"build\", \"$1\"],\"env\":{\"foo\":\"bar\"}}"