artifacts for canceled builds
Description
When builds are canceled (or time out after 3600 sec), artifacts are not uploaded.
We have infrastructure tests in CI, with separate jobs for deploy and destroy. Destroy uses (Terraform) state as an artifact from deploy step. We'd like the destroy step to work even when we cancel deployment, to destroy the infrastructure that was already deployed.
I imagine there are other similar use cases as well, eg. anything that involves cleanup after a partially successful build that affects resources outside CI.
Proposal
If artifacts: when:
is on_failure
or always
, upload build artifacts when job is canceled or times out (as well as when it fails).