Fix gcs upload artifact path.
If the gcs path does not end with a / then the first directory from the
source is ignored. Adding an extra / at the end of the gsutil path fixes
the problem.
Bug: https://github.com/flutter/flutter/issues/81855
Change-Id: I8b9ca6eac93eedeb1fabf52bead2025461da8569
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/31760
Reviewed-by: Godofredo Contreras <godofredoc@google.com>
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
diff --git a/recipes/engine_v2/builder.expected/basic_gcs.json b/recipes/engine_v2/builder.expected/basic_gcs.json
index 44ea53f..52146c6 100644
--- a/recipes/engine_v2/builder.expected/basic_gcs.json
+++ b/recipes/engine_v2/builder.expected/basic_gcs.json
@@ -945,7 +945,7 @@
"cp",
"-r",
"[CLEANUP]/host_debug_unopt_tmp_1/*",
- "gs://flutter_archives_v2/flutter_infra_release/flutter/"
+ "gs://flutter_archives_v2/flutter_infra_release/flutter//"
],
"cwd": "[CACHE]/builder/src/flutter",
"env": {
@@ -969,7 +969,7 @@
"infra_step": true,
"name": "gsutil host_debug_unopt",
"~followup_annotations": [
- "@@@STEP_LINK@gsutil.upload@https://console.cloud.google.com/storage/browser/flutter_archives_v2/flutter_infra_release/flutter/@@@"
+ "@@@STEP_LINK@gsutil.upload@https://console.cloud.google.com/storage/browser/flutter_archives_v2/flutter_infra_release/flutter//@@@"
]
},
{
diff --git a/recipes/engine_v2/builder.py b/recipes/engine_v2/builder.py
index f48873d..650ce3f 100644
--- a/recipes/engine_v2/builder.py
+++ b/recipes/engine_v2/builder.py
@@ -152,7 +152,7 @@
if archive_config.get('type') == 'gcs' and archive_config.get('include_paths', []):
commit = api.repo_util.get_commit(checkout.join('flutter'))
- artifact_path = 'flutter_infra_release/flutter/%s' % commit
+ artifact_path = 'flutter_infra_release/flutter/%s/' % commit
api.gsutil.upload(
source='%s/*' % archive_dir, bucket='flutter_archives_v2',
dest=artifact_path, args=['-r'],