Skip to content

Commit e65d3a6

Browse files
committed
Ensure remote builds have access to px cli. Squash with original commit
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent ffebc53 commit e65d3a6

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

src/pxl_scripts/BUILD.bazel

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ package(default_visibility = ["//src:__subpackages__"])
2020

2121
filegroup(
2222
name = "preset_queries",
23-
srcs = glob([
24-
"**/*.pxl",
25-
"**/*.json",
26-
"**/*.yaml",
27-
], exclude = ["bundle-oss.json"]),
23+
srcs = glob(
24+
[
25+
"**/*.pxl",
26+
"**/*.json",
27+
"**/*.yaml",
28+
],
29+
exclude = ["bundle-oss.json"],
30+
),
2831
visibility = ["//src:__subpackages__"],
2932
)
3033

@@ -43,7 +46,10 @@ genrule(
4346
":preset_queries",
4447
],
4548
outs = ["bundle-oss.json"],
46-
cmd = "export PATH_PREFIX=$$(dirname $(location //src/pxl_scripts:makefile))/; make -C $$PATH_PREFIX bundle-oss.json; cp bundle-oss.json $(@D)/bundle-oss.json",
49+
cmd = "export PATH_PREFIX=$$(dirname $(location //src/pxl_scripts:makefile))/; PX_BIN=../../$(location //src/pixie_cli:px) make -C $$PATH_PREFIX bundle-oss.json; cp bundle-oss.json $(@D)/bundle-oss.json",
50+
tools = [
51+
"//src/pixie_cli:px",
52+
],
4753
visibility = ["//src:__subpackages__"],
4854
)
4955

src/pxl_scripts/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ K := $(foreach exec,$(EXECUTABLES),\
2525
# Optional path prefix to use for the script_files path. Used by bazel
2626
# to ensure the scripts are in the correct location.
2727
PATH_PREFIX ?= ""
28+
PX_BIN ?= px
2829

2930
all: bundle-oss.json.gz
3031

@@ -37,7 +38,7 @@ bundle-oss.json: $(script_files)
3738
export HOME=$$TMPDIR; \
3839
trap "rm -rf $$TMPDIR" EXIT; \
3940
fi; \
40-
px create-bundle --search_path $(PWD) $(foreach dir,$(dirs),--base $(PATH_PREFIX)$(dir)) -o $(PWD)/bundle-oss.json
41+
$(PX_BIN) create-bundle --search_path $(PWD) $(foreach dir,$(dirs),--base $(PATH_PREFIX)$(dir)) -o $(PWD)/bundle-oss.json
4142

4243
bundle-oss.json.gz: bundle-oss.json
4344
gzip -c $< > $@

0 commit comments

Comments
 (0)