-
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) * feat(bazel): add wasm filters to build * fix(bazel): mv wasm filters to kong/filters Co-authored-by: Michael Martin <[email protected]> * fix(bazel): filter file renaming Co-authored-by: Michael Martin <[email protected]> * 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: Michael Martin <[email protected]>
- Loading branch information
1 parent
91afde0
commit 6531037
Showing
6 changed files
with
82 additions
and
3 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] |
6531037
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bazel Build
Docker image available
kong/kong:65310372ce306c384f12bb56efb1fe04447029c6
Artifacts available https://github.com/Kong/kong/actions/runs/8759037276