wp-matrix
Woodpecker CI plugin to send messages to a Matrix room.
steps:
- name: notify
image: quay.io/thegeeklab/matrix
settings:
homeserver: https://matrix.org
room_id: randomstring:matrix.org
username: octocat
password: random-secret
-
Authentication access token.Default: none
-
Matrix home server url.Default: https://matrix.org
-
Skip SSL verification.Default: false
-
Plugin log level.Default: info
-
Authentication password.Default: none
-
Room ID to send messages to.Default: none
-
Golang template for the message.
The Metadata struct is exposed to the template and all fields can be referenced. To extend the functionality, sprig functions can also be used.
Default: Status: **{{ .Pipeline.Status }}** Build: [{{ .Repository.Slug }}]({{ .Pipeline.URL }}){{ if .Curr.Branch }} ({{ .Curr.Branch }}){{ end }} by {{ .Curr.Author.Name }} Message: {{ .Curr.Title }}{{ if .Curr.URL }} ([source]({{ .Curr.URL }})){{ end }} -
Render raw HTML and potentially dangerous links in template.
By default, raw HTML and potentially dangerous links in the template are not rendered. If inline HTML is used, it may be necessary to activate this option. In such cases, please ensure that the CI configuration files in the git repository are protected against malicious changes.
Default: false -
Authentication user ID.
If set, the
access_token
parameter is required as well.Default: none -
Authentication username.
If set, the
password
parameter is required as well.Default: none
Build the binary with the following command:
make build
Build the container image with the following command:
docker build --file Containerfile.multiarch --tag thegeeklab/wp-matrix .
docker run --rm \
-e PLUGIN_ROOM_ID=randomstring:matrix.org \
-e PLUGIN_USERNAME=octocat \
-e PLUGIN_PASSWORD=random-secret \
-v $(pwd):/build:z \
-w /build \
thegeeklab/wp-matrix