bazel: Include "bazelisk" in step name

This makes the step names copy-pastable repro instructions!

Change-Id: I06aae35077953f6b96f110d5d635f25f904e3450
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/274592
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Ted Pudlik <tpudlik@google.com>
diff --git a/recipe_modules/bazel/api.py b/recipe_modules/bazel/api.py
index 8f1e742..14390cb 100644
--- a/recipe_modules/bazel/api.py
+++ b/recipe_modules/bazel/api.py
@@ -194,7 +194,9 @@
                             *self.options.extra_args,
                         ]
 
-                        with self.api.step.nest(shlex.join(args)):
+                        with self.api.step.nest(
+                            shlex.join(['bazelisk'] + args)
+                        ):
 
                             def bazel():
                                 with self.api.default_timeout():
diff --git a/recipe_modules/bazel/tests/full.py b/recipe_modules/bazel/tests/full.py
index cd5d738..31d8937 100644
--- a/recipe_modules/bazel/tests/full.py
+++ b/recipe_modules/bazel/tests/full.py
@@ -91,8 +91,8 @@
         'latest-without-overrides',
         api.bazel.properties(program=['default']),
         api.post_process(post_process.MustRun, 'ensure bazelisk'),
-        lacks_override('default.test //...', 'pigweed'),
-        lacks_override('default.test //...', 'thirdparty'),
+        lacks_override('default.bazelisk test //...', 'pigweed'),
+        lacks_override('default.bazelisk test //...', 'thirdparty'),
         api.post_process(post_process.DropExpectation),
     )
 
@@ -101,9 +101,9 @@
         api.bazel.properties(program=['default']),
         api.properties(overrides=['pigweed', 'thirdparty']),
         api.post_process(post_process.MustRun, 'ensure bazelisk'),
-        contains_override('default.test //...', 'pigweed'),
-        contains_override('default.test //...', 'thirdparty'),
-        lacks_override('default.test //...', 'additional'),
+        contains_override('default.bazelisk test //...', 'pigweed'),
+        contains_override('default.bazelisk test //...', 'thirdparty'),
+        lacks_override('default.bazelisk test //...', 'additional'),
         api.post_process(post_process.DropExpectation),
     )
 
diff --git a/recipes/bazel.expected/simple.json b/recipes/bazel.expected/simple.json
index 4068048..abea06d 100644
--- a/recipes/bazel.expected/simple.json
+++ b/recipes/bazel.expected/simple.json
@@ -242,14 +242,14 @@
   },
   {
     "cmd": [],
-    "name": "default.build //...",
+    "name": "default.bazelisk build //...",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
   },
   {
     "cmd": [],
-    "name": "default.build //....resultstore link",
+    "name": "default.bazelisk build //....resultstore link",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
       "@@@STEP_LINK@resultstore@https://result.store/@@@"
@@ -288,7 +288,7 @@
       "TRIGGERING_CHANGES_JSON": "[CLEANUP]/tmp_tmp_1"
     },
     "infra_step": true,
-    "name": "default.build //....resultstore link.read 2",
+    "name": "default.bazelisk build //....resultstore link.read 2",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@3@@@",
       "@@@STEP_LOG_LINE@metadata.json@{@@@",
@@ -299,7 +299,7 @@
   },
   {
     "cmd": [],
-    "name": "default.build //....timeout 10s",
+    "name": "default.bazelisk build //....timeout 10s",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@"
     ]
@@ -347,7 +347,7 @@
         "soft_deadline": 1337000037.0
       }
     },
-    "name": "default.build //....bazel",
+    "name": "default.bazelisk build //....bazel",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
       "@@@STEP_LOG_LINE@json.output (read error)@JSON file was missing or unreadable:@@@",
@@ -357,14 +357,14 @@
   },
   {
     "cmd": [],
-    "name": "default.test //...",
+    "name": "default.bazelisk test //...",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
   },
   {
     "cmd": [],
-    "name": "default.test //....resultstore link",
+    "name": "default.bazelisk test //....resultstore link",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
       "@@@STEP_LINK@resultstore@https://result.store/@@@"
@@ -403,7 +403,7 @@
       "TRIGGERING_CHANGES_JSON": "[CLEANUP]/tmp_tmp_1"
     },
     "infra_step": true,
-    "name": "default.test //....resultstore link.read 2",
+    "name": "default.bazelisk test //....resultstore link.read 2",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@3@@@",
       "@@@STEP_LOG_LINE@metadata.json@{@@@",
@@ -414,7 +414,7 @@
   },
   {
     "cmd": [],
-    "name": "default.test //....timeout 10s",
+    "name": "default.bazelisk test //....timeout 10s",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@"
     ]
@@ -462,7 +462,7 @@
         "soft_deadline": 1337000040.0
       }
     },
-    "name": "default.test //....bazel",
+    "name": "default.bazelisk test //....bazel",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@2@@@",
       "@@@STEP_LOG_LINE@json.output (read error)@JSON file was missing or unreadable:@@@",
diff --git a/recipes/docs_builder.py b/recipes/docs_builder.py
index 256bad2..cee024d 100644
--- a/recipes/docs_builder.py
+++ b/recipes/docs_builder.py
@@ -232,7 +232,7 @@
         ran('gn gen'),
         ran('ninja'),
         did_not_run('step'),
-        did_not_run('docs.build //docs'),
+        did_not_run('docs.bazelisk build //docs'),
         ran(f'upload {build_id}'),
         url_is(f'https://pending.docs/{build_id}'),
         drop(),
@@ -246,7 +246,7 @@
             bazel_options=api.bazel.options(program='docs'),
         ),
         api.bazel.config(),
-        ran('docs.build //docs'),
+        ran('docs.bazelisk build //docs'),
         did_not_run('step'),
         did_not_run('gn gen'),
         did_not_run('ninja'),
@@ -272,7 +272,7 @@
         ran('step'),
         did_not_run('gn gen'),
         did_not_run('ninja'),
-        did_not_run('docs.build //docs'),
+        did_not_run('docs.bazelisk build //docs'),
         ran(f'upload {build_id}'),
         ran(f'upload {change_id}'),
         ran('post CL comment'),