-
Notifications
You must be signed in to change notification settings - Fork 1k
Add a new command to setup a cleanup policy for functions artifacts #8268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I assume this can go in as reverse compatible and in the vNext branch you're going to take a swing at checking the policy on deployment and removing the ArtifactCleaner (and its related experiments)?
@inlined yep that's the plan. Added that work in go/firebase-tools-14, and will work on it soon. |
…base/firebase-tools into dl-artifacts-cleanup-policy
Add command
functions:artifacts:setpolicy
.This new command leverages Artifact Registry's cleanup policies feature. Cleanup policies are a managed service feature that automatically removes container images based on configurable rules, providing a more robust and transparent solution.
The command simplifies the process of configuring these policies for Cloud Run functions repositories. By default, the command sets up a policy that deletes images older than 3 days. Users can easily adjust this retention period using the
--days
option.The command handles checking if the user already has a cleanup policy set up. The cli command will check if a clean up policy exists, and if so, will prompt the user if they wish to proceed.