Custom TTL for artifacts

It’d be really nice to be able to set a time to live for buildkite artifacts.

I don’t use artifacts for long term storage and could absolutely have artifacts I’d be willing to delete immediately after the pipeline finishes.

This is not a request to increase the current 6 month ttl.

It’d be nice to be able to do something like this:

# ...

ttl=$(TZ=UTC date --date="1 hour")
buildkite-agent artifact upload --ttl="$ttl" path/to/artifact

Hello, @charliekenney23! Welcome to the community!
To speed up the deletion of your artifacts, you can delete artifacts using REST API:

curl -X DELETE "http://api.buildkite.com/v2/organizations/{artifact.job.build.project.account.slug}/pipelines/{artifact.job.build.project.slug}/builds/{artifact.job.build.number}/jobs/{artifact.job.uuid}/artifacts/{artifact.uuid}?access_token={access_token.token}

You can schedule the deletion process to run after the pipeline has finished or within the desired time frame of up to six months.

Cheers!