From 801084007159e0b1b4c95134e754d876e688ebed Mon Sep 17 00:00:00 2001 From: Carlos O'Ryan Date: Wed, 10 Mar 2021 20:34:12 -0500 Subject: [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 --- docs/users/binarycaching.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'docs/users') 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,[,] +``` + +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:///,readwrite +``` + +Example 2 (using a bucket and a prefix for the objects): + +``` +x-gcs,gs:///my-vcpkg-cache/maybe/with/many/slashes/,readwrite +x-gcs,gs:///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 `;;...`), and the command line option `--binarysource=`. 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. -- cgit v1.2.3