4 ms·
This is pretty easy to do with a cloud function. I was a little apprehensive at first, but have been using it across many buckets and haven't seen any issues. H
by justinph 9y ago
This is pretty easy to do with a cloud function. I was a little apprehensive at first, but have been using it across many buckets and haven't seen any issues. Here's a version of the script I'm using:
https://gist.github.com/justinph/acb6301d63b407e1fb205cbb42e08cba https://gist.github.com/justinph/acb6301d63b407e1fb205cbb42e...
Google recently announced some changes with cloud storage and pubsub triggers that potentially means that you could only have this trigger when a file is newly created, not every change. I haven't looked into that yet.
- jacques_chester 9y agoThe code I've picked up from a predecessor uses a Concourse task to achieve a similar end. But it's just annoying that I can't set a policy on the bucket. As an aside, it looks as though Google's golang API for GCS has a way to set the policy when you provide the file, so maybe at some point I can close this issue: https://github.com/concourse/semver-resource/issues/61 https://github.com/concourse/semver-resource/issues/61