This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Portable docker images cleanup script (#1445)
Support running the cleanup script on both mac and linux. gnudate on mac is `gdate`, while it is `date` on linux. Also separate the cleanup script so deployments can be run piecemeal
- Loading branch information
Showing
3 changed files
with
24 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
export PROJECT_NAME_CI=key-transparency | ||
export CLOUDSDK_COMPUTE_ZONE=us-central1-a | ||
export CLUSTER_NAME_CI=ci-cluster | ||
|
||
gnudate() { | ||
if hash gdate 2>/dev/null; then | ||
gdate "$@" | ||
else | ||
date "$@" | ||
fi | ||
} | ||
|
||
echo "Cleaning old docker images..." | ||
BEFORE_DATE=$(gnudate --date="30 days ago" +%Y-%m-%d) | ||
./scripts/gcrgc.sh gcr.io/key-transparency/init $BEFORE_DATE | ||
./scripts/gcrgc.sh gcr.io/key-transparency/prometheus $BEFORE_DATE | ||
./scripts/gcrgc.sh gcr.io/key-transparency/keytransparency-server $BEFORE_DATE | ||
./scripts/gcrgc.sh gcr.io/key-transparency/keytransparency-sequencer $BEFORE_DATE | ||
./scripts/gcrgc.sh gcr.io/key-transparency/keytransparency-monitor $BEFORE_DATE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters