-
-
Notifications
You must be signed in to change notification settings - Fork 109
Description
Overview
Is there a way to version objects based on uploaded timestamp? In other words, avoid versioning objects by pattern-matching filenames to identify version numbers. The use case to this is for situations where S3 content does not follow a strict semver policy for file names. In this scenario, the pipeline is required to be triggered on each S3 upload by taking the latest file (using timestamp as the check behaviour to order every fetch from S3 upon a resource check step).
Use Case
A front-end web application is built with a drag and drop functionality for file upload. On every upload, the pipeline is to be triggered to download and unpack the latest zip folder, and run a set of jobs on the file content producing a report at the end of the pipeline.
Issue
The current behaviour of this resource depends on the filename containing a semver. That is not usually the case.
Potential solution
Have a flag use_timestamp so that when set to true, the resource will use upload time to extract the content (based on a regexp). So something along the lines of
extractions := versions.GetBucketUploadedFiles(command.s3client, request.Source)
Note
If this is not feasible, what is the reason for it? To my understanding of concourse resource types the chronological order for an S3 bucket file upload could be upload timestamp