watch: View logs of in-progress builds

Concourse emits streaming colored logs on the website but it can be helpful to have the logs availiable to the command line. (e.g. so that they can be processed by other commands).

The watch command can be used to do just this. You can also view builds that are running in your pipeline, or builds that have already finished.

Note that unlike execute, killing fly watch via SIGINT or SIGTERM will not abort the build.

To watch the most recent one-off build, just run fly watch with no arguments. To watch a specific build (one-off or no), pass --build with the ID of the build to watch. This ID is available at the start of execute's output or by browsing to the builds list in the web UI.

By using the --job and --build flags you can pick out a specific build of a job to watch. For example, the following command will either show the archived logs for an old build if it has finished running or it will stream the current logs if the build is still in progress.

$ fly -t example watch --job my-pipeline/tests --build 52

If the --job flag is specified and --build is omitted, the most recent build of the specified job will be selected.