Skip to content

Commit

Permalink
Clean up codebase
Browse files Browse the repository at this point in the history
This makes a pass over the entire repository to clean it up a bit so
that we can comfortably publish it.
  • Loading branch information
dominiklohmann committed Apr 11, 2024
1 parent f240833 commit dc836c3
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
/.git/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
File renamed without changes.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG TENZIR_VERSION=main
FROM ghcr.io/tenzir/tenzir-dev:${TENZIR_VERSION} AS example-builder-untested

COPY example /plugins/example
COPY . /plugins/example/

RUN cmake -S /plugins/example -B build-example -G Ninja -D CMAKE_INSTALL_PREFIX:STRING="$PREFIX"
RUN cmake --build build-example --parallel
Expand Down
34 changes: 29 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
# Tenzir Example Plugin

This is an example plugin for Tenzir. Simply run `docker compose up` to build
and start a Tenzir node with your additional plugin. Use `docker compose run
tenzir '<pipeline>'` to interact with the node, or set the following
environment variables and to connect your node to app.tenzir.com:
This is an example plugin for Tenzir.

## Build and run

Simply run `docker compose up` to build and start a Tenzir node with your
additional plugin.

Use `docker compose run tenzir '<pipeline>'` to interact with the node. Set the
following environment variables and to connect your node to app.tenzir.com:

```
export TENZIR_PLUGINS__PLATFORM__API_KEY='<api-key>'
export TENZIR_PLUGINS__PLATFORM__TENANT_ID='<tenant-id>'
```

## Write Tests
## Learn how to write a plugin

We think that learning how to build a plugin is best done by example. Tenzir
ships with a variety of [plugins][plugins-source] and
[builtins][builtins-source] to get inspired by and to learn from.

If you have any questions, feel free to reach out in the [#developers channel
on Discord][discord].

## Run tests

Every plugin defines additional tests using
[BATS](https://bats-core.readthedocs.io/en/stable/writing-tests.html). Use
`docker compose run tests` to execute your tests and update the reference files
automatically.

## Contribute your plugin

If you want to upstream your plugin so that it is bundled with every Tenzir
installation, open a PR that adds it to the [`plugins/` directory in the
`tenzir/tenzir` repository][plugins-source].

[plugins-source]: https://github.com/tenzir/tenzir/tree/main/plugins
[builtins-source]: https://github.com/tenzir/tenzir/tree/main/libtenzir/builtins
[discord]: https://docs.tenzir.com/discord
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit dc836c3

Please sign in to comment.