You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[docs] binarycaching.md: Move Configuration section to the top. Add table of… (#17060)
* binarycaching.md: Move Configuration section to the top. Add table of contents. Make clear that file location must be absolute. Add that read is the default mode.
* Apply suggestions from code review
Co-authored-by: ras0219 <[email protected]>
Co-authored-by: ras0219 <[email protected]>
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.
25
+
26
+
By default, zip-based archives will be cached at the first valid location of:
27
+
28
+
**Windows**
29
+
1.`%VCPKG_DEFAULT_BINARY_CACHE%`
30
+
2.`%LOCALAPPDATA%\vcpkg\archives`
31
+
3.`%APPDATA%\vcpkg\archives`
32
+
33
+
**Non-Windows**
34
+
1.`$VCPKG_DEFAULT_BINARY_CACHE`
35
+
2.`$XDG_CACHE_HOME/vcpkg/archives`
36
+
3.`$HOME/.cache/vcpkg/archives`
37
+
38
+
### Valid source strings (`<source>`)
39
+
40
+
| form | description
41
+
|-----------------------------|---------------
42
+
| `clear` | Removes all previous sources (including the default)
43
+
| `default[,<rw>]` | Adds the default file-based location
44
+
| `files,<absolute path>[,<rw>]` | Adds a custom file-based location
45
+
| `nuget,<uri>[,<rw>]` | Adds a NuGet-based source; equivalent to the `-Source` parameter of the NuGet CLI
46
+
| `nugetconfig,<path>[,<rw>]` | Adds a NuGet-config-file-based source; equivalent to the `-Config` parameter of the NuGet CLI. This config should specify `defaultPushSource` for uploads.
47
+
| `x-azblob,<baseuri>,<sas>[,<rw>]` | **Experimental: will change or be removed without warning**<br> Adds an Azure Blob Storage source. Uses Shared Access Signature validation. URL should include the container path.
48
+
| `interactive` | Enables interactive credential management for NuGet (for debugging; requires `--debug` on the command line)
49
+
50
+
The `<rw>` optional parameter for certain sources controls whether they will be consulted for
51
+
downloading binaries (`read`)(default), whether on-demand builds will be uploaded to that remote (`write`), or both (`readwrite`).
52
+
53
+
Additional configuration details for NuGet-based providers can be found below in [NuGet Provider Configuration](#nuget-provider-configuration).
10
54
11
55
## CI Examples
12
56
@@ -146,40 +190,9 @@ Commas (`,`) are valid as part of a object prefix in GCS, just remember to escap
146
190
shown in the previous example. Note that GCS does not have folders (some of the GCS tools simulate folders), it is not
147
191
necessary to create or otherwise manipulate the prefix used by your vcpkg cache.
148
192
149
-
## Configuration
150
-
151
-
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.
152
-
153
-
By default, zip-based archives will be cached at the first valid location of:
154
-
155
-
**Windows**
156
-
1. `%VCPKG_DEFAULT_BINARY_CACHE%`
157
-
2. `%LOCALAPPDATA%\vcpkg\archives`
158
-
3. `%APPDATA%\vcpkg\archives`
159
-
160
-
**Non-Windows**
161
-
1. `$VCPKG_DEFAULT_BINARY_CACHE`
162
-
2. `$XDG_CACHE_HOME/vcpkg/archives`
163
-
3. `$HOME/.cache/vcpkg/archives`
164
-
165
-
### Valid source strings (`<source>`)
166
-
167
-
| form | description
168
-
|-----------------------------|---------------
169
-
| `clear` | Removes all previous sources (including the default)
170
-
| `default[,<rw>]` | Adds the default file-based location
171
-
| `files,<path>[,<rw>]` | Adds a custom file-based location
172
-
| `nuget,<uri>[,<rw>]` | Adds a NuGet-based source; equivalent to the `-Source` parameter of the NuGet CLI
173
-
| `nugetconfig,<path>[,<rw>]` | Adds a NuGet-config-file-based source; equivalent to the `-Config` parameter of the NuGet CLI. This config should specify `defaultPushSource` for uploads.
174
-
| `x-azblob,<baseuri>,<sas>[,<rw>]` | **Experimental: will change or be removed without warning**<br> Adds an Azure Blob Storage source. Uses Shared Access Signature validation. URL should include the container path.
175
-
| `interactive` | Enables interactive credential management for NuGet (for debugging; requires `--debug` on the command line)
176
-
177
-
The `<rw>` optional parameter for certain sources controls whether they will be consulted for
178
-
downloading binaries (`read`), whether on-demand builds will be uploaded to that remote (`write`), or both (`readwrite`).
179
-
180
-
### Nuget Provider Configuration
193
+
## NuGet Provider Configuration
181
194
182
-
#### Credentials
195
+
### Credentials
183
196
184
197
Many NuGet servers require additional credentials to access. The most flexible way to supply credentials is via the `nugetconfig` provider with a custom `nuget.config` file. See https://docs.microsoft.com/en-us/nuget/consume-packages/consuming-packages-authenticated-feeds for more information on authenticating via `nuget.config`.
0 commit comments