Translate environment for bb runs.
Led portion of the implementation already migrated to translate the
environment from the bucket but buildbucket portion of it was missing
the implementation.
Change-Id: I41b92c4f126fc0831eb56228a2d1f71e435e1482
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/35882
Reviewed-by: Jesse Seales <jseales@google.com>
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
Reviewed-by: Yusuf Mohsinally <mohsinally@google.com>
diff --git a/recipe_modules/shard_util_v2/api.py b/recipe_modules/shard_util_v2/api.py
index 9fc464c..2e2ecd0 100644
--- a/recipe_modules/shard_util_v2/api.py
+++ b/recipe_modules/shard_util_v2/api.py
@@ -235,7 +235,7 @@
environment = drone_properties.get('environment')
environment = '%s ' % environment if environment else ''
bucket = self.m.buildbucket.build.builder.bucket
- environment = '' if bucket == 'try' else environment
+ environment = ENVIRONMENTS_MAP[bucket]
builder_name = build.get(
'drone_builder_name',
'%s %sEngine Drone' % (platform_name, environment))