`copilot job run --follow` option (feature request)
It would be useful when testing a Scheduled Job to be able to immediately tail the log output in the CLI
e.g.
copilot job run --follow
would behave similarly to copilot job run && copilot job logs --follow except the logs would be limited to the just triggered run.
This would also be consistent with copilot task run --follow (except for a job rather than a task)
+1 to this.
My use case involves running a database migration. I'm not using the copilot pipelines; instead, I prefer to trigger the deployment operation through a GitHub Action. As I couldn't find an intuitive way to run migrations, the solution I came up with was to define the db-migration as a job (with schedule: "none"). I would have expected to be able to run copilot job run --follow and be able to read the exit code; unfortunately, that isn't possible.
The workaround I'm using is to invoke a task based off that job. I'm sharing in case it works for you as well:
- Execute
copilot task run --generate-cmd my-app/my-job - Take the output from the prior command and append \ --follow
- Execute the modified output