recipes: Set GCS URLs to output properties

It will be useful to retrieve the GS URLs later.

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_internal
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: Ifb1ce2a161fc6fa6b2554d4a8b14eb9de0754fde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6796221
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
changes/21/6796221/7
Junji Watanabe 3 months ago committed by LUCI CQ
parent 4b5b51c8e5
commit ac0e10e880

@ -734,9 +734,9 @@ Args:
* dry_run (bool): If True, don't actually run the step; just log what * dry_run (bool): If True, don't actually run the step; just log what
the step would have been. the step would have been.
&mdash; **def [cat](/recipes/recipe_modules/gsutil/api.py#129)(self, url, args=None, \*\*kwargs):** &mdash; **def [cat](/recipes/recipe_modules/gsutil/api.py#135)(self, url, args=None, \*\*kwargs):**
&emsp; **@contextlib.contextmanager**<br>&mdash; **def [configure\_gsutil](/recipes/recipe_modules/gsutil/api.py#183)(self, \*\*kwargs):** &emsp; **@contextlib.contextmanager**<br>&mdash; **def [configure\_gsutil](/recipes/recipe_modules/gsutil/api.py#189)(self, \*\*kwargs):**
Temporarily configures the behavior of gsutil. Temporarily configures the behavior of gsutil.
@ -748,21 +748,21 @@ possible configurations.
Args: Args:
kwargs: Every keyword arg is treated as config line in the temp Boto file. kwargs: Every keyword arg is treated as config line in the temp Boto file.
&mdash; **def [copy](/recipes/recipe_modules/gsutil/api.py#143)(self, source_bucket, source, dest_bucket, dest, args=None, link_name='gsutil.copy', metadata=None, unauthenticated_url=False, \*\*kwargs):** &mdash; **def [copy](/recipes/recipe_modules/gsutil/api.py#149)(self, source_bucket, source, dest_bucket, dest, args=None, link_name='gsutil.copy', metadata=None, unauthenticated_url=False, \*\*kwargs):**
&mdash; **def [download](/recipes/recipe_modules/gsutil/api.py#115)(self, bucket, source, dest, args=None, \*\*kwargs):** &mdash; **def [download](/recipes/recipe_modules/gsutil/api.py#121)(self, bucket, source, dest, args=None, \*\*kwargs):**
&mdash; **def [download\_url](/recipes/recipe_modules/gsutil/api.py#122)(self, url, dest, args=None, \*\*kwargs):** &mdash; **def [download\_url](/recipes/recipe_modules/gsutil/api.py#128)(self, url, dest, args=None, \*\*kwargs):**
&emsp; **@property**<br>&mdash; **def [gsutil\_py\_path](/recipes/recipe_modules/gsutil/api.py#17)(self):** &emsp; **@property**<br>&mdash; **def [gsutil\_py\_path](/recipes/recipe_modules/gsutil/api.py#17)(self):**
&mdash; **def [list](/recipes/recipe_modules/gsutil/api.py#162)(self, url, args=None, \*\*kwargs):** &mdash; **def [list](/recipes/recipe_modules/gsutil/api.py#168)(self, url, args=None, \*\*kwargs):**
&mdash; **def [remove\_url](/recipes/recipe_modules/gsutil/api.py#176)(self, url, args=None, \*\*kwargs):** &mdash; **def [remove\_url](/recipes/recipe_modules/gsutil/api.py#182)(self, url, args=None, \*\*kwargs):**
&mdash; **def [signurl](/recipes/recipe_modules/gsutil/api.py#169)(self, private_key_file, bucket, dest, args=None, \*\*kwargs):** &mdash; **def [signurl](/recipes/recipe_modules/gsutil/api.py#175)(self, private_key_file, bucket, dest, args=None, \*\*kwargs):**
&mdash; **def [stat](/recipes/recipe_modules/gsutil/api.py#136)(self, url, args=None, \*\*kwargs):** &mdash; **def [stat](/recipes/recipe_modules/gsutil/api.py#142)(self, url, args=None, \*\*kwargs):**
&mdash; **def [upload](/recipes/recipe_modules/gsutil/api.py#98)(self, source, bucket, dest, args=None, link_name='gsutil.upload', metadata=None, unauthenticated_url=False, \*\*kwargs):** &mdash; **def [upload](/recipes/recipe_modules/gsutil/api.py#98)(self, source, bucket, dest, args=None, link_name='gsutil.upload', metadata=None, unauthenticated_url=False, \*\*kwargs):**
### *recipe_modules* / [osx\_sdk](/recipes/recipe_modules/osx_sdk) ### *recipe_modules* / [osx\_sdk](/recipes/recipe_modules/osx_sdk)

@ -108,8 +108,14 @@ class GSUtilApi(recipe_api.RecipeApi):
if link_name: if link_name:
is_dir = '-r' in args or '--recursive' in args is_dir = '-r' in args or '--recursive' in args
result.presentation.links[link_name] = self._http_url( link = self._http_url(bucket,
bucket, dest, is_directory=is_dir, is_anonymous=unauthenticated_url) dest,
is_directory=is_dir,
is_anonymous=unauthenticated_url)
result.presentation.links[link_name] = link
if 'gsutil_urls' not in result.presentation.properties:
result.presentation.properties['gsutil_urls'] = {}
result.presentation.properties['gsutil_urls'][result.name] = full_dest
return result return result
def download(self, bucket, source, dest, args=None, **kwargs): def download(self, bucket, source, dest, args=None, **kwargs):

@ -22,7 +22,8 @@
"infra_step": true, "infra_step": true,
"name": "gsutil upload", "name": "gsutil upload",
"~followup_annotations": [ "~followup_annotations": [
"@@@STEP_LINK@gsutil.upload@https://storage.googleapis.com/example/some/random/path/to/boom@@@" "@@@STEP_LINK@gsutil.upload@https://storage.googleapis.com/example/some/random/path/to/boom@@@",
"@@@SET_BUILD_PROPERTY@gsutil_urls@{\"gsutil upload\": \"gs://example/some/random/path/to/boom\"}@@@"
] ]
}, },
{ {
@ -49,7 +50,8 @@
"infra_step": true, "infra_step": true,
"name": "gsutil upload (2)", "name": "gsutil upload (2)",
"~followup_annotations": [ "~followup_annotations": [
"@@@STEP_LINK@gsutil.upload@https://storage.googleapis.com/example/some/random/path/to/boom@@@" "@@@STEP_LINK@gsutil.upload@https://storage.googleapis.com/example/some/random/path/to/boom@@@",
"@@@SET_BUILD_PROPERTY@gsutil_urls@{\"gsutil upload (2)\": \"gs://example/some/random/path/to/boom\"}@@@"
] ]
}, },
{ {
@ -68,7 +70,8 @@
"infra_step": true, "infra_step": true,
"name": "gsutil upload -r", "name": "gsutil upload -r",
"~followup_annotations": [ "~followup_annotations": [
"@@@STEP_LINK@gsutil.upload@https://console.cloud.google.com/storage/browser/example/some/random/path@@@" "@@@STEP_LINK@gsutil.upload@https://console.cloud.google.com/storage/browser/example/some/random/path@@@",
"@@@SET_BUILD_PROPERTY@gsutil_urls@{\"gsutil upload -r\": \"gs://example/some/random/path\"}@@@"
] ]
}, },
{ {
@ -87,7 +90,8 @@
"infra_step": true, "infra_step": true,
"name": "gsutil upload --recursive", "name": "gsutil upload --recursive",
"~followup_annotations": [ "~followup_annotations": [
"@@@STEP_LINK@gsutil.upload@https://console.cloud.google.com/storage/browser/example/some/other/random/path@@@" "@@@STEP_LINK@gsutil.upload@https://console.cloud.google.com/storage/browser/example/some/other/random/path@@@",
"@@@SET_BUILD_PROPERTY@gsutil_urls@{\"gsutil upload --recursive\": \"gs://example/some/other/random/path\"}@@@"
] ]
}, },
{ {

Loading…
Cancel
Save