-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…2853) (#8917) * feat(bazel): add wasm filters to build * fix(bazel): mv wasm filters to kong/filters * fix(bazel): filter file renaming * chore(wasm): response_transofmrer filter 0.1.2 * fix(bazel): filter typo * feat(wasm): swap to datakit filter * fix(bazel): rename wasm filters repo * fix(bazel): mv wasm filters to kong/wasm --------- Co-authored-by: Isa Farnik <isa@konghq.com>
- Loading branch information
1 parent
b84d016
commit aee3845
Showing
6 changed files
with
75 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
load("@kong//build/openresty/wasmx/filters:variables.bzl", "WASM_FILTERS_TARGETS") | ||
|
||
filegroup( | ||
name = "all_srcs", | ||
srcs = glob( | ||
include = ["**"], | ||
exclude = ["*.bazel"], | ||
), | ||
) | ||
|
||
exports_files( | ||
WASM_FILTERS_TARGETS, | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") | ||
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
load(":variables.bzl", "WASM_FILTERS") | ||
|
||
def wasm_filters_repositories(): | ||
for filter in WASM_FILTERS: | ||
for file in filter["files"].keys(): | ||
renamed_file = file.replace("filter", filter["name"]) | ||
|
||
maybe( | ||
http_file, | ||
name = renamed_file, | ||
url = "https://github.com/%s/releases/download/%s/%s" % ( | ||
filter["repo"], | ||
filter["tag"], | ||
file, | ||
), | ||
sha256 = filter["files"][file], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
A list of wasm filters. | ||
""" | ||
|
||
WASM_FILTERS = [ | ||
{ | ||
"name": "datakit-filter", | ||
"repo": "Kong/datakit-filter", | ||
"tag": "0.1.0", | ||
"files": { | ||
"datakit.meta.json": "b9f3b6d51d9566fae1a34c0e5c00f0d5ad5dc8f6ce7bf81931fd0be189de205d", | ||
"datakit.wasm": "a494c254915e222c3bd2b36944156680b4534bdadf438fb2143df9e0a4ef60ad", | ||
}, | ||
}, | ||
] | ||
|
||
WASM_FILTERS_TARGETS = [ | ||
[ | ||
"@%s//file" % file | ||
for file in filter["files"].keys() | ||
] | ||
for filter in WASM_FILTERS | ||
][0] |