Matrix Notificatin eingefügt.

This commit is contained in:
Stefan H. 2023-02-08 11:40:24 +01:00
parent bc4a129e0b
commit bc8414ccb6

View file

@ -15,14 +15,17 @@ steps:
- echo "Checking Hugo version." - echo "Checking Hugo version."
- hugo version - hugo version
- hugo mod graph - hugo mod graph
- name: Submodules - name: Submodules
image: alpine/git image: alpine/git
commands: commands:
- git submodule update --init --recursive - git submodule update --init --recursive
- name: Build - name: Build
image: klakegg/hugo:ext-alpine-ci image: klakegg/hugo:ext-alpine-ci
commands: commands:
- hugo --destination /drone/src/build - hugo --destination /drone/src/build
- name: Upload - name: Upload
image: drillster/drone-rsync image: drillster/drone-rsync
commands: commands:
@ -32,7 +35,27 @@ steps:
- echo -e "Host *\\n\\tStrictHostKeyChecking no\\n\\n" > ~/.ssh/config - echo -e "Host *\\n\\tStrictHostKeyChecking no\\n\\n" > ~/.ssh/config
# - rsync -rv -e "ssh -p 22222" /drone/src/build/ hadr@server4.unhb.de:/htdocs/ --checksum # - rsync -rv -e "ssh -p 22222" /drone/src/build/ hadr@server4.unhb.de:/htdocs/ --checksum
- scp -P 22222 -r /drone/src/build/* hadr@server4.un-hack-bar.de:/htdocs/ - scp -P 22222 -r /drone/src/build/* hadr@server4.un-hack-bar.de:/htdocs/
- name: notify
image: plugins/matrix
settings:
homeserver: https://matrix.un-hack-bar.de
roomid: fUltBPKcpwFMiDQCAL:matrix.un-hack-bar.de
username: daneelolivaw
password: $MATRIX_PASSWD
template: |
{{#success build.status}}
{{build.author}} just built `{{repo.name}}:{{build.branch}}` from <${DRONE_COMMIT_LINK}|#{{truncate build.commit 8}}>
:new: {{build.message}}
{{else}}
{{build.author}} just broke the build of `{{repo.name}}:{{build.branch}}` with >${DRONE_COMMIT_LINK}|#{{truncate build.commit 8}}
:new: :zombie: {{build.message}}
{{/success}}
:stopwatch: {{ since build.started }}
:gear: {{build.link}}
environment: environment:
SSH_KEY: SSH_KEY:
from_secret: drone_ssh_key from_secret: drone_ssh_key
MATRIX_PASSWD:
from_secred: matrix_password