Optional output_file field in GCS dep

When an 'output_file' arg is included, the downloaded object from GCS
will be downloaded in that path.

Example:
```
'src/buildtools/linux': {
  'bucket': 'bucket123',
  'object_name': 'clang-format-version123',
  'dep_type': 'gcs',
  'sha256sum': 'abcd123',
  'output_file': 'clang-format',
}
```
The GCS object will be downloaded at src/buildtools/linux/clang-format

Bug: b/324418194
Change-Id: I1049abeb09a1027c5477d955e50611d43015d0a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5353387
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
This commit is contained in:
Stephanie Kim
2024-03-13 21:37:49 +00:00
committed by LUCI CQ
parent b3d7b07503
commit 53870d4056
4 changed files with 37 additions and 14 deletions

View File

@@ -136,6 +136,7 @@ _GCLIENT_DEPS_SCHEMA = _NodeDictSchema({
'bucket': str,
'object_name': str,
'sha256sum': str,
schema.Optional('output_file'): str,
schema.Optional('condition'): str,
schema.Optional('dep_type', default='gcs'): str,
}),