drone-plugins / drone-matrix

Drone plugin for sending Matrix notifications
http://plugins.drone.io/drone-plugins/drone-matrix
Apache License 2.0
8 stars 4 forks source link

Last build break notification #32

Open kosssi opened 1 year ago

kosssi commented 1 year ago

Hello,

I used Drone plugin for sending Matrix notifications but it's breaking since last build when this pull request "(maint) move to harness.drone.io" is merged.

My configuration:

- name: notify
  image: plugins/matrix
  settings:
    homeserver: https://***.***
    roomid: "***:***.***"
    userid: "***:***.***"
    accesstoken:
      from_secret: MATRIX_ACCESSTOKEN
  when:
    status: [ failure ]

the error:

time="2023-01-16T13:37:20Z" level=error msg="execution failed: failed to authenticate user: contents=[123 34 101 114 114 99 111 100 ...] msg=Failed to POST JSON to /_matrix/client/r0/login code=400 wrapped=M_INVALID_PARAM: Bad parameter: password"

This error is print from here but I don't understand normally, UserID and AccessToken are not empty...

I found a solution with specified sha256 image but I thinks it's not a good solution ;) :

image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f

I'm alone?

PS: Akismet hidden my post on https://community.harness.io/ because I would like have more than 2 links in my post... 😒

apinter commented 1 year ago

I get the messages on Matrix, but the body seems to be messed up a bit :upside_down_face:

Build [/#]() () by
plague-doctor commented 1 year ago

Same as @apinter ... Guys, can you please fix this already?

wayneconnolly commented 1 year ago

Can confirm- I'm getting the error also.

dawenga commented 1 year ago

I took the time to walk the code on this, and discovered it simply doesn't work as advertised, in fact, this NEVER worked. The Plugin struct defined doesn't export it's members (see below) meaning the template will never find the values of p when the template is applied.

Screenshot 2023-04-29 at 4 43 21 PM

This plugin is flawed.

SpotlightKid commented 1 year ago

Since this issue seems stalled, I made my own Matrixchat notification drone.io plugin:

https://github.com/SpotlightKid/drone-matrixchat-notify

Feel free to use the provided docker image on hub.docker.com or build your own custom image from the repo.