Skip to content

Commit

Permalink
pw_env_setup: Remove gsutil from PATH
Browse files Browse the repository at this point in the history
Keep the LUCI gsutil executable in the environment, but move it to where
it won't be in PATH. It's needed for coverage builds, but it shouldn't
be used by developers except explicitly.

Bug: b/396199506
Change-Id: Icfb461ba51c145e058724fc8cd463b90e17f8d94
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/268153
Presubmit-Verified: CQ Bot Account <[email protected]>
Lint: Lint 🤖 <[email protected]>
Reviewed-by: Ted Pudlik <[email protected]>
Reviewed-by: William Abajian <[email protected]>
Pigweed-Auto-Submit: Rob Mohr <[email protected]>
Docs-Not-Needed: Rob Mohr <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
  • Loading branch information
mohrr authored and CQ Bot Account committed Feb 15, 2025
1 parent 416b03b commit 264303d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions pw_env_setup/py/pw_env_setup/cipd_setup/luci.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
"mac-amd64",
"mac-arm64"
],
"subdir": "gsutil",
"tags": [
"version:[email protected]"
]
Expand Down
10 changes: 4 additions & 6 deletions pw_presubmit/py/pw_presubmit/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,12 +1023,10 @@ def _coverage_substeps(self) -> Iterator[SubStep]:


def _copy_to_gcs(ctx: PresubmitContext, filepath: Path, gcs_dst: str):
cmd = [
"gsutil",
"cp",
filepath,
gcs_dst,
]
luci = Path(pw_cli.env.pigweed_environment().PW_LUCI_CIPD_INSTALL_DIR)
gsutil = luci / 'gsutil' / 'gsutil'

cmd = [gsutil, 'cp', filepath, gcs_dst]

upload_stdout = ctx.output_dir / (filepath.name + '.stdout')
with upload_stdout.open('w') as outs:
Expand Down

0 comments on commit 264303d

Please sign in to comment.