-
Notifications
You must be signed in to change notification settings - Fork 25
Add support for GCS #145
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
Add support for GCS #145
Conversation
This adds support for Google Cloud Storage via gsutil or gcloud storage CLI. Features: - Auto-detection of gcloud vs gsutil CLI - Support for BUILDKITE_PLUGIN_GCS_CACHE_BUCKET configuration - Support for BUILDKITE_PLUGIN_GCS_CACHE_PREFIX for key prefixing - Support for BUILDKITE_PLUGIN_GCS_CACHE_QUIET for silent operation - Support for BUILDKITE_PLUGIN_GCS_CACHE_CLI to force specific CLI Addresses reviewer feedback from buildkite-plugins#138
c25eee3 to
fc8f593
Compare
|
I tested this in my own private repos and it seems to be working! Will eagerly wait for reviewer feedback so we can get this merge ready and get this functionality in for others :) |
|
@juanpark-dandy thanks for the PR! Currently there is just one failing test; ✗ Folder exists and can be restored after save
--
(from function `assert_success' in file /usr/lib/bats/bats-assert/src/assert_success.bash, line 42,
in test file tests/cache_gcs.bats, line 160)
`assert_success' failed
-- command failed --
status : 1
output (14 lines):
ln: unrecognized option: d
BusyBox v1.31.1 () multi-call binary.
Usage: ln [OPTIONS] TARGET... LINK\|DIR
Create a link LINK or DIR/TARGET to the specified TARGET(s)
-s Make symlinks instead of hardlinks
-f Remove existing destinations
-n Don't dereference symlinks - treat like normal file
-b Make a backup of the target (if exists) before link operation
-S suf Use suffix instead of ~ when making backup files
-T Treat LINK as a file, not DIR
-v Verbose
-- |
|
Thanks! Fix the tests (confirmed they run successfully :D) |
toote
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have personally split the backend in two: one for gcloud and another for gsutil. And, for convenience, the gcs one to do auto-detection and just call the corresponding one. But I don't think that is 100% necessary.
It is to note, though, that the tests only cover the gsutil one so there are untested code paths left. But they can be corrected/added in the future.
Addressing the reviewer feedback from: #138
Mainly I'd really like this functionality merged so I can use it, so I thought I'd take a crack at addressing the comments.