Fix keeping files on Amazon s3
(cherry picked from commitb57de93468
) (cherry picked from commitae5475c178
)
This commit is contained in:
parent
0314b6125f
commit
fa1aeec58e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user