Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the "key" (prefix) for versions extracted from filename by s3 resource? #149

Open
anentropic opened this issue Dec 15, 2020 · 1 comment

Comments

@anentropic
Copy link

https://concourse-ci.org/managing-resources.html#fly-pin-resource

To pin a resource to a specific version of that resource, run:
$ fly -t example pin-resource --resource my-pipeline/my-resource \ --version ref:bceaf
Note that the version needs to be provided as a key-value pair. For the git resource the ref: prefix is used while the registry resource might use digest as a prefix like digest:sha256:94be7d7b.

So if we're using s3 resource to watch a file, and the version is extracted from the filename, what is the key prefix for this version?

@anentropic
Copy link
Author

anentropic commented Dec 15, 2020

well I found fly resource-versions and was able to determine the answer

our resource def looks like:

- name: name-of-bucket-resource
  type: s3-iam
  source:
    bucket: us-east-1-some-app-bucket
    regexp: blah/blah/blah/(v.*)
    region_name: us-east-1

and the filenames in the bucket look like v1.0.23477-dfc0bed61

from what it says in the readme I was expecting the version to be the captured group i.e. v1.0.23477-dfc0bed61

instead the version is the full path blah/blah/blah/v1.0.23477-dfc0bed61

and the prefix is path

so we can pin the resource versions like:

fly -t example pin-resource \
  --resource my-pipeline/name-of-bucket-resource \
  --version path:blah/blah/blah/v1.0.23477-dfc0bed61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant