"Execute in place" support for cirrus-cli
anarazel opened this issue · 2 comments
Hi,
Right now cirrus-cli can't, as far as I can tell, be used for VM based tasks, because it wants to start a container. Nor can it be used to manually start a task when already in the target environment, e.g. when debugging a hard to reproduce problem.
It'd be nice if cirrus-cli had a mode of running a task directly in the environment it's invoked in. That obviously won't be 100% faithful to the way tasks are normally executed, but it would still be very useful.
It's possible that that's already somehow possible, but I could not figure out how.
Regards,
Andres
Hey @anarazel,
It will be a bit hacky but you can specify a persistent_worker
instance instead whatever you use right now:
task:
persistent_worker:
script: touch test.txt
In this case cirrus run --dirty
will just shell out things.
In general, I think we can add an option to override instance types from command lines.
It will be a bit hacky but you can specify a persistent_worker instance instead whatever you use right now:
Nice, that mostly does work.
One thing I noticed while playing with that is that cirrus run doesn't seem to deal with env: CIRRUS_WORKING_DIR: ... in the task? Is that expected? I'd have expected that cirrus run would copy the working directory there...
In general, I think we can add an option to override instance types from command lines.
That'd be very useful. An alternative could be a flag to indicate that cirrus-cli is already in the target environment.