Abacn commented on code in PR #24040:
URL: https://github.com/apache/beam/pull/24040#discussion_r1018330443


##########
.test-infra/tools/stale_dataflow_prebuilt_image_cleaner.sh:
##########
@@ -19,15 +19,38 @@
 #
 set -euo pipefail
 
-STALE_IMAGES=$(gcloud container images list-tags \
-gcr.io/apache-beam-testing/prebuilt_beam_sdk/beam_python_prebuilt_sdk \
---sort-by=TIMESTAMP  --filter="timestamp.datetime < $(date --iso-8601=s -d '1 
day ago')" \
---format="get(digest)")
+REPOSITORIES=(prebuilt_beam_sdk/beam_python_prebuilt_sdk beam-sdk 
beam_portability)
 
-if [[ ${STALE_IMAGES} ]]; then
-  for digest in ${STALE_IMAGES}; do
-    gcloud container images delete 
gcr.io/apache-beam-testing/prebuilt_beam_sdk/beam_python_prebuilt_sdk@"$digest" 
--force-delete-tags -q
+echo $REPOSITORIES
+
+for repository in ${REPOSITORIES[@]}; do
+  echo IMAGES FOR REPO ${repository}
+  IMAGE_NAMES+=$(gcloud container images list 
--repository=gcr.io/apache-beam-testing/${repository} --format="get(name)")
+  IMAGE_NAMES+=" "
+done
+
+echo $IMAGE_NAMES
+
+for image_name in ${IMAGE_NAMES[@]}; do
+  echo IMAGES FOR image ${image_name}
+  echo "Command" gcloud container images list-tags \
+  ${image_name} \
+  --sort-by=TIMESTAMP  --filter="timestamp.datetime < $(date --iso-8601=s -d 
'5 days ago')" \

Review Comment:
   nit (does not affect functionality)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to