gcs_upload: Add artifacts to output properties Change-Id: I6066eefc9c0997963ecf3a0e85221a447a7b0520 Bug: b/517945015 Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/415158
diff --git a/recipe_modules/gcs_upload/api.py b/recipe_modules/gcs_upload/api.py index 8e8d547..a0715e7 100644 --- a/recipe_modules/gcs_upload/api.py +++ b/recipe_modules/gcs_upload/api.py
@@ -116,6 +116,10 @@ pres.properties['artifacts'] = self.link def raw_result(self) -> result_pb.RawResult: + pres = self._api.step.empty('artifacts').presentation + pres.links['artifacts'] = self.link + pres.properties['artifacts_url'] = self.link + return result_pb.RawResult( summary_markdown=f'[artifacts]({self.link})', status=common_pb.SUCCESS,
diff --git a/recipe_modules/pw_presubmit/tests/full.expected/long.json b/recipe_modules/pw_presubmit/tests/full.expected/long.json index 2f8595a..da28773 100644 --- a/recipe_modules/pw_presubmit/tests/full.expected/long.json +++ b/recipe_modules/pw_presubmit/tests/full.expected/long.json
@@ -3666,6 +3666,14 @@ "name": "get build id" }, { + "cmd": [], + "name": "artifacts", + "~followup_annotations": [ + "@@@STEP_LINK@artifacts@https://console.cloud.google.com/storage/browser/bucket/builds/8945511751514863184/@@@", + "@@@SET_BUILD_PROPERTY@artifacts_url@\"https://console.cloud.google.com/storage/browser/bucket/builds/8945511751514863184/\"@@@" + ] + }, + { "name": "$result" } ] \ No newline at end of file
diff --git a/recipes/bazel.expected/simple.json b/recipes/bazel.expected/simple.json index e7f97a4..8f7260f 100644 --- a/recipes/bazel.expected/simple.json +++ b/recipes/bazel.expected/simple.json
@@ -6236,6 +6236,14 @@ }, { "cmd": [], + "name": "artifacts", + "~followup_annotations": [ + "@@@STEP_LINK@artifacts@https://console.cloud.google.com/storage/browser/bucket/builds/0/@@@", + "@@@SET_BUILD_PROPERTY@artifacts_url@\"https://console.cloud.google.com/storage/browser/bucket/builds/0/\"@@@" + ] + }, + { + "cmd": [], "name": "set output properties", "~followup_annotations": [ "@@@SET_BUILD_PROPERTY@artifacts@\"https://console.cloud.google.com/storage/browser/bucket/builds/0/\"@@@"