From fa1aeec58e5c1d2b22e06c05ad6b3aa48c415391 Mon Sep 17 00:00:00 2001 From: Jan Stodola Date: Thu, 4 Apr 2019 13:59:45 +0200 Subject: [PATCH] Fix keeping files on Amazon s3 (cherry picked from commit b57de934681056aa4f9bd480a34136cf340f510a) (cherry picked from commit ae5475c178de1d9ca78de811bcfc4432fef9fb16) --- tests/cleanup/remove_old_objects_aws.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cleanup/remove_old_objects_aws.sh b/tests/cleanup/remove_old_objects_aws.sh index c2485d28..dd782b88 100755 --- a/tests/cleanup/remove_old_objects_aws.sh +++ b/tests/cleanup/remove_old_objects_aws.sh @@ -172,7 +172,7 @@ done if [ "$creation_date" \< "$TIMESTAMP" ]; then # find and delete s3 objects without the "keep_me" tag keep=$(aws s3api get-object-tagging --bucket ${AWS_BUCKET} --key ${filename_f} --output text | cut -f2 | grep "^keep_me$") - if [ -n "$keep" ]; then + if [ -z "$keep" ]; then rlLogInfo "Removing old file $filename_f created $date_f $time_f" rlRun -t -c "aws s3 rm s3://${AWS_BUCKET}/${filename_f}" fi