Skip to content

Commit

Permalink
Fix the build of the reproxyui.
Browse files Browse the repository at this point in the history
The build was using the version of node and npm found in the user's /usr/bin directory instead of the hermetic version.
Also HOME was set to a non writable location.

Fixes #52

Change-Id: I83aefbe6b92bff01139611d00dcbc4cfc10fd478
Test: https://github.com/bentekkie/reclient/actions/runs/9618518748
Bug: N/A
GitOrigin-RevId: c653e8733eec94b9f9209c8bdebed12e3a747ad5
  • Loading branch information
bentekkie authored and copybara-github committed Jun 25, 2024
1 parent 6fcc7f4 commit 1f089b9
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions internal/pkg/logrecordserver/ui/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,20 @@ genrule(
exclude = ["app/dist/**/*"],
),
outs = ["reproxytool_ui.tar"],
cmd_bash = "export PATH=$$PATH:$$PWD/$$(dirname $(NPM_PATH)) && export ROOT=$$PWD ;" +
"echo \"Installing angular...\" ; cd internal/pkg/logrecordserver/ui/app ; $$ROOT/$(NPM_PATH) ci ;" +
"echo \"Building app\" ; node_modules/.bin/ng build ;" +
"cd $$ROOT ; tar cvf $(OUTS) internal/pkg/logrecordserver/ui/app/dist/reproxyui/browser",
cmd_bash = """
export PATH=$$PWD/$$(dirname $(NPM_PATH)):$$PWD/$$(dirname $(NODE_PATH)):$$PATH
export ROOT=$$PWD
export HOME=/tmp
echo "Installing angular..."
cd internal/pkg/logrecordserver/ui/app
$$ROOT/$(NPM_PATH) ci
echo "Building app"
node_modules/.bin/ng build
cd $$ROOT
tar cvf $(OUTS) internal/pkg/logrecordserver/ui/app/dist/reproxyui/browser
""",
exec_properties = {"dockerNetwork": "standard"},
target_compatible_with = select({
"@platforms//os:linux": [],
Expand Down

0 comments on commit 1f089b9

Please sign in to comment.