Skip to content

Conversation

@juanpark-dandy
Copy link
Contributor

  • This MR adds support for google cloud storage via gsutil or gcloud storage

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.

@juanpark-dandy juanpark-dandy requested a review from a team as a code owner January 17, 2026 10:44
@juanpark-dandy juanpark-dandy changed the title Port over GCS support from #138 and address reviewer feedback Jan 17, 2026
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
@juanpark-dandy
Copy link
Contributor Author

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 :)

@mcncl
Copy link
Contributor

mcncl commented Jan 19, 2026

@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
--
@juanpark-dandy
Copy link
Contributor Author

juanpark-dandy commented Jan 19, 2026

Thanks! Fix the tests (confirmed they run successfully :D)

Copy link
Contributor

@toote toote left a 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.

@pzeballos pzeballos merged commit fea1afa into buildkite-plugins:master Jan 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants