From 6a46b11b8bebca60dc96964d01cff5e670b93732 Mon Sep 17 00:00:00 2001 From: Carlos O'Ryan Date: Sat, 20 Feb 2021 22:11:59 -0500 Subject: [PATCH 1/3] [docs/users/binarycaching.md] a little blurb about using GCS --- docs/users/binarycaching.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/users/binarycaching.md b/docs/users/binarycaching.md index 07e238f925635f..7e2a6d10e5f639 100644 --- a/docs/users/binarycaching.md +++ b/docs/users/binarycaching.md @@ -112,6 +112,36 @@ 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. + +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 +``` + +Be aware that while commas (`,`) are valid as part of a object prefix in GCS, they should not be used with vcpkg. 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. From a871bdc2ca06e35a23c9d5670cfac1c872082978 Mon Sep 17 00:00:00 2001 From: Carlos O'Ryan Date: Sun, 21 Feb 2021 00:56:58 -0500 Subject: [PATCH 2/3] Address review comments --- docs/users/binarycaching.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/users/binarycaching.md b/docs/users/binarycaching.md index 7e2a6d10e5f639..ae74c7733edb71 100644 --- a/docs/users/binarycaching.md +++ b/docs/users/binarycaching.md @@ -125,6 +125,7 @@ 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 PATH. Example 1 (using a bucket without a common prefix for the objects): @@ -136,11 +137,12 @@ 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 ``` -Be aware that while commas (`,`) are valid as part of a object prefix in GCS, they should not be used with vcpkg. 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. +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 From 46b482765edf7e7141f772edaacacd1ec7246d6a Mon Sep 17 00:00:00 2001 From: Carlos O'Ryan Date: Sun, 21 Feb 2021 00:58:53 -0500 Subject: [PATCH 3/3] Small tweaks --- docs/users/binarycaching.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/users/binarycaching.md b/docs/users/binarycaching.md index ae74c7733edb71..a388e406569a12 100644 --- a/docs/users/binarycaching.md +++ b/docs/users/binarycaching.md @@ -125,7 +125,7 @@ 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 PATH. +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):