cloud-gov / s3-simple-resource

Concourse CI Resource for uploading files to S3
https://hub.docker.com/r/18fgsa/s3-resource-simple/
Other
30 stars 74 forks source link

Check fails if bucket is empty #49

Open charles-dyfis-net opened 1 year ago

charles-dyfis-net commented 1 year ago

When a bucket has no initial contents, this resource fails with the error:

jq: error (at <stdin>:1): Cannot iterate over null (null)

This is because in this scenario, aws s3api list-objects --query 'Contents[].{LastModified: LastModified}' returns null, and max_by(.LastModified) is not a valid jq query.

Acceptance Criteria