-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This changes the example plugin from doing nothing to trimming strings, which is a much more useful example.
- Loading branch information
1 parent
33ca197
commit 926c719
Showing
11 changed files
with
144 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
cmake_minimum_required(VERSION 3.19...3.28 FATAL_ERROR) | ||
|
||
project(example | ||
DESCRIPTION "Example plugin for Tenzir" | ||
project(trim | ||
DESCRIPTION "Trim operator plugin for Tenzir" | ||
LANGUAGES CXX) | ||
|
||
find_package(Tenzir REQUIRED PATHS "/opt/tenzir") | ||
|
||
TenzirRegisterPlugin( | ||
TARGET example | ||
TARGET trim | ||
ENTRYPOINT "src/plugin.cpp" | ||
SOURCES GLOB "src/*.cpp" | ||
INCLUDE_DIRECTORIES "include") |
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 |
---|---|---|
@@ -1,20 +1,18 @@ | ||
ARG TENZIR_VERSION=main | ||
FROM ghcr.io/tenzir/tenzir-dev:${TENZIR_VERSION} AS example-builder | ||
FROM ghcr.io/tenzir/tenzir-dev:${TENZIR_VERSION} AS builder | ||
|
||
COPY . /plugins/example/ | ||
COPY . /tmp/trim/ | ||
|
||
RUN cmake -S /plugins/example -B build-example -G Ninja -D CMAKE_INSTALL_PREFIX:STRING="$PREFIX" | ||
RUN cmake --build build-example --parallel | ||
RUN cmake --install build-example --strip --component Runtime --prefix /plugin/example | ||
RUN cmake -S /tmp/trim -B /tmp/trim/build -G Ninja -D CMAKE_INSTALL_PREFIX:STRING="$PREFIX" | ||
RUN cmake --build /tmp/trim/build --parallel | ||
RUN cmake --install /tmp/trim/build --strip --component Runtime --prefix /opt/tenzir/plugin/trim | ||
|
||
FROM example-builder AS example-test | ||
FROM builder AS test | ||
|
||
ENV BATS_LIB_PATH=/tmp/tenzir/tenzir/integration/lib | ||
# TODO: Use the update-integration target instead | ||
ENV UPDATE=1 | ||
|
||
ENTRYPOINT cmake --build build-example --target integration | ||
ENTRYPOINT cmake --build /tmp/trim/build --target update-integration | ||
|
||
FROM ghcr.io/tenzir/tenzir:${TENZIR_VERSION} | ||
|
||
COPY --from=example-builder --chown=tenzir:tenzir /plugin/example /opt/tenzir | ||
COPY --from=builder --chown=tenzir:tenzir /opt/tenzir/plugin/trim /opt/tenzir/plugin/trim |
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
1 change: 0 additions & 1 deletion
1
integration/data/reference/tests/test_check_plugin_availability/step_00.ref
This file was deleted.
Oops, something went wrong.
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 @@ | ||
{"foo": "foo"} |
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 @@ | ||
{"foo": "foo", "bar": " bar"} |
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 @@ | ||
{"foo": "foo", "bar": "bar"} |
6 changes: 6 additions & 0 deletions
6
integration/data/reference/tests/test_trimming_non-2dstring_fields_fails/step_00.ref
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,6 @@ | ||
error: NotImplemented: Function 'utf8_trim' has no kernel matching input types (uint64) | ||
--> <input>:1:16 | ||
| | ||
1 | version | trim :uint64 | ||
| ^^^^^^^ | ||
| |
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