If the director runs on a machine with Go installed, it should be fairly trivial for it to be able to:
detect that an act-tester-mach binary is missing or has the wrong version;
invoke the Go compiler in a cross-compiler configuration;
sftp over the final binary to ~/.local/bin or maybe some pre-suggested path;
try act-tester-mach again, and if it still fails, bomb out asking for manual intervention.
This could even be run in a unit test, since, as far as I understand, if you can go test you can go build.
I currently use a shell script for doing this locally, but doing it in the director would benefit from being able to use the existing machine configuration. I'm thinking there should be a 'machine health check' stage before or parallel to doing the initial plan that does this step.
If the director runs on a machine with Go installed, it should be fairly trivial for it to be able to:
act-tester-mach
binary is missing or has the wrong version;sftp
over the final binary to~/.local/bin
or maybe some pre-suggested path;act-tester-mach
again, and if it still fails, bomb out asking for manual intervention.This could even be run in a unit test, since, as far as I understand, if you can
go test
you cango build
.I currently use a shell script for doing this locally, but doing it in the director would benefit from being able to use the existing machine configuration. I'm thinking there should be a 'machine health check' stage before or parallel to doing the initial plan that does this step.