Where do Agents Store Build Logs on Disk?

I’d like to know where Build Logs are stored on the instance or within the agent’s file system. Is there any documentation on this behavior? I know the build logs end up in Buildkite’s private S3 bucket for long term storage, but I’m curious to know where and how long they are on disk for.

Hi @OwenCR,

By default the build logs are not stored on the file system of the instance and is streamed directly through our API to the S3 bucket. If you prefer to have the log file present on instance then you need to redirect your command script output in the pipeline steps to a file as shown in this example

  - label: "local build log"
    command: echo "output to a new file" | tee -a /tmp/build.log

This will create build.log in /tmp directory with output of that command script and keep appending to it. As you are redirecting to a specific folder and file on the disk as long it is not cleaned up it should exist as this is not managed by Buildkite build process.

Regarding the retention of the builds logs in Buildkite private S3 bucket currently we do not have retention policy but that would change in future. However we will make an announcement about it before the retention policy changes so that users are made aware of it. Thank you