Skip to content

Commit

Permalink
[ci] Optimizing image cleanup (#9604)
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksey Gavrilov <[email protected]>
  • Loading branch information
alexey-gavrilov-flant authored Nov 29, 2024
1 parent 2885e08 commit 69c58aa
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions werf_cleanup.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
project: deckhouse
configVersion: 1
cleanup:
# All date calculations are based on the dates of the last commits in the branches.
keepImagesBuiltWithinLastNHours: 24 # don't touch fresh builds for 24h
disableKubernetesBasedPolicy: true
keepPolicies:
# keep 3 days dev builds
- references:
branch: /.*/
limit:
in: 72h
# keep 3 pre-release builds
- references:
branch: /release-.*/
limit:
in: 360h
last: 3
# keep 3 release builds
- references:
tag: /.*/
limit:
in: 360h
last: 3
# Keep 14 days of all builds in main.
# This should reduce what needs to be built for pr after the branch is cleared after 3 days.
- references:
branch: main
imagesPerReference:
last: -1
in: 336h

0 comments on commit 69c58aa

Please sign in to comment.