Grab the commit from flutter instead of buildroot.

Bug: https://github.com/flutter/flutter/issues/81855
Change-Id: I649f3810ea9ed0d7a496f2d0a6b96990be0d16cd
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/31163
Reviewed-by: Xilai Zhang <xilaizhang@google.com>
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
Reviewed-by: Keyong Han <keyonghan@google.com>
diff --git a/recipes/engine_v2/builder.expected/basic_gcs.json b/recipes/engine_v2/builder.expected/basic_gcs.json
index b2df948..9d66b03 100644
--- a/recipes/engine_v2/builder.expected/basic_gcs.json
+++ b/recipes/engine_v2/builder.expected/basic_gcs.json
@@ -845,7 +845,7 @@
       "rev-parse",
       "HEAD"
     ],
-    "cwd": "[CACHE]/builder/src",
+    "cwd": "[CACHE]/builder/src/flutter",
     "env": {
       "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
       "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
diff --git a/recipes/engine_v2/builder.py b/recipes/engine_v2/builder.py
index 842504c..9dad0b6 100644
--- a/recipes/engine_v2/builder.py
+++ b/recipes/engine_v2/builder.py
@@ -131,7 +131,7 @@
       api.file.ensure_directory('Ensuring %s' % archive_dir.join(rel_path), archive_dir.join(rel_path))
       api.file.copy('Copy %s' % include_path, full_include_path, archive_dir.join(rel_path, base_name))
   if archive_config.get('type') == 'gcs':
-    commit = api.repo_util.get_commit(checkout)
+    commit = api.repo_util.get_commit(checkout.join('flutter'))
     api.gsutil.upload(
         source='%s/*' % archive_dir, bucket='flutter_archives_v2',
         dest='flutter_infra_release/flutter/%s' % commit,  args=['-r'],