Specify retention days for CI workflow artifacts #755
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Specify retention days for CI workflow artifacts to be a lower number of days for large files. Lower than the 60 day default.
Why
The CI build workflows create a lot of artifacts because the build is completed across many instances and artifacts are how the results of each build are passed to the next job. These artifacts by default are retained for 60 days which is excessively long when the artifacts are only used by the build process in the moment of the build.
The shortest time we can set the artifact expiry is 1 day, but I've set it to 7 days for images and 60 days for logs. Logs are small and it is sometimes useful to be able to go able and look at logs. Images are larger but rarely do we need to go back and use them. The main reason to keep it at 7 and not 1 is so that if we have a failed build that needs to rerun some steps, the artifacts being present from the earlier run is helpful.
When images are built from local branch PRs, the final image gets pushed up to dockerhub anyway.