First class plugins are here!
October 24, 2020 by @devth
October 24, 2020 by @devth
Since nearly the beginning of its existence, Yetibot has supported the notion of plugins by simply loading namespaces that looked like commands, e.g. mycompany.plugins.commands.mycommand
, but it was up to the user to get the plugin JAR on the classpath or source file included in the local source tree.
This was never ideal, for a few reasons:
Configure the plugins you want to use, and Yetibot will resolve and load them on start up:
{:yetibot
{:plugins
{:kroki
{:artifact "yetibot/kroki"
:version "20201022.003832.0ae5bf7"}}}}
Beware that specifying a large number of plugins will increase Yetibot's start up time. This is the trade off between static (baking artifacts into an uberjar or Docker image) and dynamic (loading at runtime on startup).
Yetibot's official plugins (those under the Yetibot GitHub Org) are ultra simple to create and release because of the surrounding automation we constructed:
project.clj
for an example of what this looks like).If you have an idea for a module and think it should belong under the Yetibot org as an official plugin, feel free to suggest it in the #dev channel on Yetibot Slack.
Otherwise, anyone can build a module wherever they like, release it to an artifact repository and consume it via configuration.
Now that plugins are easy to build, release, and consume, we will move toward much smaller logically separated code bases. Over time we'll extract commands from yetibot
and yetibot/core
in to separate plugins. This will make features easier to work with, test in isolation, and release.
Here's the PR that enabled plugins. The change itself was quite small.
Check out the new Dynamic plugins docs, and as always please give us feedback by leaving a comment below, chatting with us in Slack, or opening a GitHub issue.