aboutsummaryrefslogtreecommitdiff
path: root/docs/users/binarycaching.md
diff options
context:
space:
mode:
authorCarlos O'Ryan <coryan@users.noreply.github.com>2021-03-10 20:34:12 -0500
committerGitHub <noreply@github.com>2021-03-10 19:34:12 -0600
commit801084007159e0b1b4c95134e754d876e688ebed (patch)
treee60e18e6b50b249c74ea7d05c376106c36e0f98d /docs/users/binarycaching.md
parentfe2a6bb789e904520797ec229272c6c1a42e7e38 (diff)
downloadvcpkg-801084007159e0b1b4c95134e754d876e688ebed.tar.gz
vcpkg-801084007159e0b1b4c95134e754d876e688ebed.zip
[docs/users/binarycaching.md] a little blurb about using GCS (#16337)
* [docs/users/binarycaching.md] a little blurb about using GCS * Address review comments * Small tweaks
Diffstat (limited to 'docs/users/binarycaching.md')
-rw-r--r--docs/users/binarycaching.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/users/binarycaching.md b/docs/users/binarycaching.md
index 07e238f92..a388e4065 100644
--- a/docs/users/binarycaching.md
+++ b/docs/users/binarycaching.md
@@ -112,6 +112,38 @@ Vcpkg will attempt to avoid revealing the SAS during normal operations, however:
1. It will be printed in full if `--debug` is passed
2. It will be passed as a command line parameter to subprocesses, such as `curl.exe`
+### Google Cloud Storage (experimental)
+
+> Note: This is an experimental feature and may change or be removed at any time
+
+Vcpkg supports interfacing with Google Cloud Storage (GCS) via the `x-gcs` source type.
+
+```
+x-gcs,<prefix>[,<rw>]
+```
+
+First, you need to create an Google Cloud Platform Account as well as a storage bucket ([GCS Quick Start](https://cloud.google.com/storage/docs/quickstart-gsutil)].
+
+As part of this quickstart you would have configured the `gsutil` command-line tool to authenticate with Google Cloud.
+Vcpkg will use this command-line tool, make sure it is in your search path for executables.
+
+Example 1 (using a bucket without a common prefix for the objects):
+
+```
+x-gcs,gs://<bucket-name>/,readwrite
+```
+
+Example 2 (using a bucket and a prefix for the objects):
+
+```
+x-gcs,gs://<bucket-name>/my-vcpkg-cache/maybe/with/many/slashes/,readwrite
+x-gcs,gs://<bucket-name>/my-vcpkg-cache/maybe/with`,commas/too!/,readwrite
+```
+
+Commas (`,`) are valid as part of a object prefix in GCS, just remember to escape them in the vcpkg configuration, as
+shown in the previous example. Note that GCS does not have folders (some of the GCS tools simulate folders), it is not
+necessary to create or otherwise manipulate the prefix used by your vcpkg cache.
+
## Configuration
Binary caching is configured via a combination of defaults, the environment variable `VCPKG_BINARY_SOURCES` (set to `<source>;<source>;...`), and the command line option `--binarysource=<source>`. Source options are evaluated in order of defaults, then environment, then command line. Binary caching can be completely disabled by passing `--binarysource=clear` as the last command line option.