This includes the method stubs for the archive step. Before I continue I need to
do some thinking about how naming of archives might work, or where they can be
put for now.
This was WAY EASIER than I thought it would be, which has me extra pumped about
this design decision.
The pipeline.yml sent to the agent:
---
steps:
- symbol: sh
parameters:
script: 'ls -lah | tail -n 5'
- symbol: sh
parameters:
script: 'echo "Hello world from a script"'
- symbol: dir
parameters:
directory: 'stdlib'
block:
- symbol: sh
parameters:
script: 'pwd && ls -lah'
- symbol: echo
parameters:
message: 'Hello from a block-scoped step!'
- symbol: unknown
parameters:
message: 'this should fail'
Then executing it in the tree:
❯ STEPS_DIR=$PWD/tmp ./target/debug/otto-agent ./test-pipeline.yml
sh exists
sh exists
dir exists
unknown/manifest.yml does not exist, step cannot execute
NORMALLY THIS WOULD ERROR BEFORE ANYTHING EXECUTES
---
-rw-r--r-- 1 tyler users 1.1K Feb 20 2020 system.dot
-rw-r--r-- 1 tyler users 43K Feb 20 2020 system.png
drwxr-xr-x 7 tyler users 4.0K Oct 17 15:25 target
-rw-r--r-- 1 tyler users 1.5K Oct 22 20:38 test-pipeline.yml
drwxr-xr-x 5 tyler users 4.0K Oct 22 20:35 tmp
Hello world from a script
sh exists
echo exists
---
/home/tyler/source/git/otto/stdlib
total 20K
drwxr-xr-x 5 tyler users 4.0K Oct 22 20:02 .
drwxr-xr-x 22 tyler users 4.0K Oct 22 20:38 ..
drwxr-xr-x 4 tyler users 4.0K Oct 22 20:19 dir
drwxr-xr-x 2 tyler users 4.0K Oct 22 20:28 echo
drwxr-xr-x 4 tyler users 4.0K Oct 21 19:40 sh
Hello from a block-scoped step!
Voila!
I'm still noodling through how the eventbus HTTP API should look. My current
thinking is that it should approximately support Kafka like semantics, since
that's the likely first "real" backing implementation of eventbus
Still not really doing anything worth a damn, but at least we're grabbing the
manifest and doing something with it at this point.
I still don't know squat about rust
I clearly don't know anything about Rust thus far, but was just experimenting
with what it might look like to build an agent that requests JSON over HTTP
might look like.