save_logs: Save pigweed_environment.gni file

Change-Id: I42d116974b10c1ceea82d2f91f5d6bd830891d8c
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/167870
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
diff --git a/recipe_modules/environment/tests/full.expected/doctor-fail.json b/recipe_modules/environment/tests/full.expected/doctor-fail.json
index 3c55625..656b904 100644
--- a/recipe_modules/environment/tests/full.expected/doctor-fail.json
+++ b/recipe_modules/environment/tests/full.expected/doctor-fail.json
@@ -508,6 +508,25 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/environment",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "name": "environment.run pw_env_setup.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/environment",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/environment/tests/full.expected/normal.json b/recipe_modules/environment/tests/full.expected/normal.json
index 27c019b..d9e3bc0 100644
--- a/recipe_modules/environment/tests/full.expected/normal.json
+++ b/recipe_modules/environment/tests/full.expected/normal.json
@@ -736,6 +736,25 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/environment",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "name": "environment.run pw_env_setup.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/environment",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/environment/tests/full.expected/override-cas.json b/recipe_modules/environment/tests/full.expected/override-cas.json
index 0496f22..296e6d7 100644
--- a/recipe_modules/environment/tests/full.expected/override-cas.json
+++ b/recipe_modules/environment/tests/full.expected/override-cas.json
@@ -506,6 +506,25 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/environment",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "name": "environment.run pw_env_setup.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/environment",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/environment/tests/full.expected/override-cipd.json b/recipe_modules/environment/tests/full.expected/override-cipd.json
index ace1151..82cfdd8 100644
--- a/recipe_modules/environment/tests/full.expected/override-cipd.json
+++ b/recipe_modules/environment/tests/full.expected/override-cipd.json
@@ -506,6 +506,25 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/environment",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "name": "environment.run pw_env_setup.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/environment",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/environment/tests/full.expected/windows.json b/recipe_modules/environment/tests/full.expected/windows.json
index 84faec4..bb26b1f 100644
--- a/recipe_modules/environment/tests/full.expected/windows.json
+++ b/recipe_modules/environment/tests/full.expected/windows.json
@@ -506,6 +506,25 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]\\environment",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "name": "environment.run pw_env_setup.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]\\environment",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/pw_presubmit/tests/full.expected/bad-json-steps.json b/recipe_modules/pw_presubmit/tests/full.expected/bad-json-steps.json
index 07ffe73..35646fd 100644
--- a/recipe_modules/pw_presubmit/tests/full.expected/bad-json-steps.json
+++ b/recipe_modules/pw_presubmit/tests/full.expected/bad-json-steps.json
@@ -773,6 +773,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/program_0",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "program_0.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/program_0",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
@@ -1955,6 +1986,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/program_1",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "program_1.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/program_1",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/pw_presubmit/tests/full.expected/comment-always-disallowed-host.json b/recipe_modules/pw_presubmit/tests/full.expected/comment-always-disallowed-host.json
index fe51363..e38599a 100644
--- a/recipe_modules/pw_presubmit/tests/full.expected/comment-always-disallowed-host.json
+++ b/recipe_modules/pw_presubmit/tests/full.expected/comment-always-disallowed-host.json
@@ -772,6 +772,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/step1",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step1.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/step1",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
@@ -1964,6 +1995,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/step2",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step2.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/step2",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/pw_presubmit/tests/full.expected/comment-always-no-cl.json b/recipe_modules/pw_presubmit/tests/full.expected/comment-always-no-cl.json
index a298e8a..0eedf05 100644
--- a/recipe_modules/pw_presubmit/tests/full.expected/comment-always-no-cl.json
+++ b/recipe_modules/pw_presubmit/tests/full.expected/comment-always-no-cl.json
@@ -772,6 +772,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/step1",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step1.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/step1",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
@@ -1964,6 +1995,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/step2",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step2.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/step2",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/pw_presubmit/tests/full.expected/comment-always.json b/recipe_modules/pw_presubmit/tests/full.expected/comment-always.json
index 2726cf3..4f84ff6 100644
--- a/recipe_modules/pw_presubmit/tests/full.expected/comment-always.json
+++ b/recipe_modules/pw_presubmit/tests/full.expected/comment-always.json
@@ -935,6 +935,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/step1",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step1.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/step1",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
@@ -2170,6 +2201,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/step2",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step2.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/step2",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/pw_presubmit/tests/full.expected/comment-on-failure.json b/recipe_modules/pw_presubmit/tests/full.expected/comment-on-failure.json
index f54ae14..e1553f5 100644
--- a/recipe_modules/pw_presubmit/tests/full.expected/comment-on-failure.json
+++ b/recipe_modules/pw_presubmit/tests/full.expected/comment-on-failure.json
@@ -772,6 +772,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/step1",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step1.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/step1",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
@@ -1964,6 +1995,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/step2",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step2.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/step2",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/pw_presubmit/tests/full.expected/long.json b/recipe_modules/pw_presubmit/tests/full.expected/long.json
index b74e8a3..e85d060 100644
--- a/recipe_modules/pw_presubmit/tests/full.expected/long.json
+++ b/recipe_modules/pw_presubmit/tests/full.expected/long.json
@@ -764,6 +764,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/step1",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step1.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/step1",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
@@ -1948,6 +1979,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/step2",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step2.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/step2",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/pw_presubmit/tests/full.expected/medium.json b/recipe_modules/pw_presubmit/tests/full.expected/medium.json
index 520c7e5..a539afb 100644
--- a/recipe_modules/pw_presubmit/tests/full.expected/medium.json
+++ b/recipe_modules/pw_presubmit/tests/full.expected/medium.json
@@ -764,6 +764,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/step1",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step1.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/step1",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
@@ -1948,6 +1979,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/step2",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step2.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/step2",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/pw_presubmit/tests/full.expected/pigweed.json b/recipe_modules/pw_presubmit/tests/full.expected/pigweed.json
index 11d2c5c..794863e 100644
--- a/recipe_modules/pw_presubmit/tests/full.expected/pigweed.json
+++ b/recipe_modules/pw_presubmit/tests/full.expected/pigweed.json
@@ -762,6 +762,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/full_0",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "full_0.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/full_0",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
@@ -1946,6 +1977,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/full_1",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "full_1.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/full_1",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/pw_presubmit/tests/full.expected/step.json b/recipe_modules/pw_presubmit/tests/full.expected/step.json
index 580c97e..7bde2ab 100644
--- a/recipe_modules/pw_presubmit/tests/full.expected/step.json
+++ b/recipe_modules/pw_presubmit/tests/full.expected/step.json
@@ -772,6 +772,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/step1",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step1.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/step1",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
@@ -1962,6 +1993,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/step2",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step2.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/step2",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/pw_presubmit/tests/full.expected/substep.json b/recipe_modules/pw_presubmit/tests/full.expected/substep.json
index b74205a..9a93aec 100644
--- a/recipe_modules/pw_presubmit/tests/full.expected/substep.json
+++ b/recipe_modules/pw_presubmit/tests/full.expected/substep.json
@@ -533,6 +533,25 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout/p/composite",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "name": "composite.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout/p/composite",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipe_modules/save_logs/api.py b/recipe_modules/save_logs/api.py
index 22ab5e0..29bcdae 100644
--- a/recipe_modules/save_logs/api.py
+++ b/recipe_modules/save_logs/api.py
@@ -45,6 +45,7 @@
             '*/*.log',
             '*/*.txt',
             '*_log',
+            'pigweed_environment.gni',
             'coverage_reports/*.tar.gz',
         ]
         self.m.path.mock_add_file(dirs[0] / '.ninja_log')
diff --git a/recipe_modules/save_logs/tests/full.expected/full.json b/recipe_modules/save_logs/tests/full.expected/full.json
index 189af84..fadcf92 100644
--- a/recipe_modules/save_logs/tests/full.expected/full.json
+++ b/recipe_modules/save_logs/tests/full.expected/full.json
@@ -359,6 +359,25 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/checkout",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "name": "save logs.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/checkout",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipes/docs_builder.expected/docs-postsubmit.json b/recipes/docs_builder.expected/docs-postsubmit.json
index 9863c04..845f10a 100644
--- a/recipes/docs_builder.expected/docs-postsubmit.json
+++ b/recipes/docs_builder.expected/docs-postsubmit.json
@@ -1463,6 +1463,28 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/co/p/step",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "env": {
+      "PW_TEST_VAR": "test_value"
+    },
+    "infra_step": true,
+    "name": "step.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/co/p/step",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipes/docs_builder.expected/docs-presubmit.json b/recipes/docs_builder.expected/docs-presubmit.json
index 471744a..7ab479b 100644
--- a/recipes/docs_builder.expected/docs-presubmit.json
+++ b/recipes/docs_builder.expected/docs-presubmit.json
@@ -2515,6 +2515,40 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/co/p/step",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "env": {
+      "PW_TEST_VAR": "test_value"
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/co/p/step",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipes/envtest.expected/environment_variables.json b/recipes/envtest.expected/environment_variables.json
index c40f1b9..ec43ea8 100644
--- a/recipes/envtest.expected/environment_variables.json
+++ b/recipes/envtest.expected/environment_variables.json
@@ -1311,6 +1311,25 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/environment",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "name": "logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/environment",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipes/envtest.expected/fail.json b/recipes/envtest.expected/fail.json
index 376c78d..500bd31 100644
--- a/recipes/envtest.expected/fail.json
+++ b/recipes/envtest.expected/fail.json
@@ -2070,6 +2070,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/environment",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/environment",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipes/envtest.expected/pigweed.json b/recipes/envtest.expected/pigweed.json
index 604d9ae..0bbde3a 100644
--- a/recipes/envtest.expected/pigweed.json
+++ b/recipes/envtest.expected/pigweed.json
@@ -2067,6 +2067,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/environment",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/environment",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipes/envtest.expected/windows.json b/recipes/envtest.expected/windows.json
index 10909bb..bcdffa0 100644
--- a/recipes/envtest.expected/windows.json
+++ b/recipes/envtest.expected/windows.json
@@ -2065,6 +2065,37 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]\\environment",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]\\environment",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipes/pw_presubmit.expected/one_step_no_exit.json b/recipes/pw_presubmit.expected/one_step_no_exit.json
index 794a2ff..9bb7cf8 100644
--- a/recipes/pw_presubmit.expected/one_step_no_exit.json
+++ b/recipes/pw_presubmit.expected/one_step_no_exit.json
@@ -2610,6 +2610,40 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/co/p/step1",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "env": {
+      "PW_TEST_VAR": "test_value"
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step1.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/co/p/step1",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipes/pw_presubmit.expected/sign.json b/recipes/pw_presubmit.expected/sign.json
index ac81632..5f09887 100644
--- a/recipes/pw_presubmit.expected/sign.json
+++ b/recipes/pw_presubmit.expected/sign.json
@@ -2250,6 +2250,40 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/co/p/release",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "env": {
+      "PW_TEST_VAR": "test_value"
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "release.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/co/p/release",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipes/pw_presubmit.expected/two_steps.json b/recipes/pw_presubmit.expected/two_steps.json
index f892ed2..0ad0e08 100644
--- a/recipes/pw_presubmit.expected/two_steps.json
+++ b/recipes/pw_presubmit.expected/two_steps.json
@@ -2521,6 +2521,40 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/co/p/step1",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "env": {
+      "PW_TEST_VAR": "test_value"
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step1.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/co/p/step1",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
@@ -3773,6 +3807,40 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/co/p/step2",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "env": {
+      "PW_TEST_VAR": "test_value"
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:try"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "step2.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/co/p/step2",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],
diff --git a/recipes/target_to_cipd.expected/pw-presubmit.json b/recipes/target_to_cipd.expected/pw-presubmit.json
index 475245c..3bac017 100644
--- a/recipes/target_to_cipd.expected/pw-presubmit.json
+++ b/recipes/target_to_cipd.expected/pw-presubmit.json
@@ -1484,6 +1484,28 @@
       "/path/to/tmp/json",
       "glob",
       "[START_DIR]/co/p/step",
+      "pigweed_environment.gni",
+      "--hidden"
+    ],
+    "env": {
+      "PW_TEST_VAR": "test_value"
+    },
+    "infra_step": true,
+    "name": "step.logs.glob.pigweed_environment.gni",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_LOG_END@glob@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "glob",
+      "[START_DIR]/co/p/step",
       "coverage_reports/*.tar.gz",
       "--hidden"
     ],