diff --git a/_docs/_index.md b/_docs/content/_index.md similarity index 76% rename from _docs/_index.md rename to _docs/content/_index.md index 9ec8847..d831d37 100644 --- a/_docs/_index.md +++ b/_docs/content/_index.md @@ -17,6 +17,32 @@ Drone plugin to to send messages to a Matrix room. +## Usage + +```YAML +kind: pipeline +name: default + +steps: +- name: notify + image: thegeeklab/matrix + settings: + homeserver: https://matrix.org + roomid: abcdefghijklmnopqrstuvwxyz:matrix.org + username: octocat + password: secret +``` + +### Parameters + + + +{{< propertylist name=drone-matrix.data >}} + + + +### Examples + ## Build Build the binary with the following command: @@ -36,7 +62,7 @@ Build the Docker image with the following command: docker build --file docker/Dockerfile.amd64 --tag thegeeklab/drone-matrix . ``` -## Usage +## Test ```Shell docker run --rm \ @@ -47,26 +73,3 @@ docker run --rm \ -w $(pwd) \ thegeeklab/drone-matrix ``` - -### Parameters - -username -: sets username for authentication - -password -: sets password for authentication - -user_id -: sets userid for authentication - -access_token -: sets access token for authentication - -homeserver -: sets matrix home server url to use (default `https://matrix.org`) - -roomid -: sets roomid to send messages to - -template -: sets message template; used default template `build {{ build.status }} [{{ repo.owner }}/{{ repo.name }}#{{ truncate build.commit 8 }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}` diff --git a/_docs/data/data.yaml b/_docs/data/data.yaml new file mode 100644 index 0000000..12466de --- /dev/null +++ b/_docs/data/data.yaml @@ -0,0 +1,38 @@ +--- +properties: + username: + description: The authentication username. If set, password is required as well. + type: string + required: false + + password: + description: The authentication password. + type: string + required: false + + user_id: + description: The authentication user uid. If set, access token is required as well. + type: string + required: false + + access_token: + description: The authentication access token. + type: string + required: false + + homeserver: + description: The Matrix homeserver url to use. + defaultValue: https://matrix.org + type: string + required: false + + roomid: + description: The Room ID to send messages to. + type: string + required: false + + template: + description: Golang Template for the messages. + defaultValue: build {{ build.status }} [{{ repo.owner }}/{{ repo.name }}#{{ truncate build.commit 8 }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }} + type: string + required: false