Skip to main content

Mattermost

Alerticorn supports sending messages to Mattermost using the Slack notifier, which is compatible with Mattermost.

Creating a Mattermost Incoming Webhook

Follow the instructions on the Mattermost website to create an Incoming Webhook.

Dependency

dependencies {
testImplementation("nl.vanwollingen.alerticorn:alerticorn-slack-notifier:0.1")
}

Shorthand Annotation

There is no equivalent @Mattermost shorthand to indicate the platform. You can easily create one, that routes to the Slack notifier.

Create a @Mattermost annotation
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS)
@Message.Platform("slack")
annotation class Mattermost
Example of using @Mattermost
@Mattermost
@Message(title = "This would go to Mattermost")
@Test
fun test() {
//...
}

Configuration

Configure environment variables with AC_SLACK_CHANNEL_<your channel name> to hold the channel webhooks.