Skip to content

Commit

Permalink
Merge pull request #697 from danistrebel/feature/clean-image-repo
Browse files Browse the repository at this point in the history
fix: only try to delete untagged images
  • Loading branch information
OmidTahouri authored Aug 30, 2023
2 parents 9815c61 + 60f5a9f commit 913d2f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/pipeline-runner/image-clean.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ steps:
echo "Cleaning stale versions of: $$IMAGE_URI"
VERSIONS_TO_CLEAN=$(gcloud artifacts docker images list "$$IMAGE_URI" \
--include-tags \
--filter="UPDATE_TIME.date('%Y-%m-%d', Z)<=$(date --date="-${_IMAGE_RETENTION_MIN} days" +'%Y-%m-%d')" \
--filter="UPDATE_TIME.date('%Y-%m-%d', Z)<=$(date --date="-${_IMAGE_RETENTION_MIN} days" +'%Y-%m-%d') AND -TAGS:*" \
--format='value(VERSION)')
if [ -z "$$VERSIONS_TO_CLEAN" ]; then
Expand Down

0 comments on commit 913d2f5

Please sign in to comment.