Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last build break notification #32

Open
kosssi opened this issue Jan 16, 2023 · 5 comments
Open

Last build break notification #32

kosssi opened this issue Jan 16, 2023 · 5 comments

Comments

@kosssi
Copy link

kosssi commented Jan 16, 2023

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
Copy link

apinter commented Mar 3, 2023

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

Build [/#]() () by

@plague-doctor
Copy link

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

@wayneconnolly
Copy link

Can confirm- I'm getting the error also.

@dawenga
Copy link

dawenga commented Apr 29, 2023

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.

ghost pushed a commit to dawenga/drone-matrix that referenced this issue Apr 29, 2023
Overview:

The template rendering is wrong, it passes a pointer to p, which
has only private members. I believe what's intended is to pass the
value of p.pipeline, given the details for the user to embed.

Change log:
- updated; Execute to pass p.pipeline instead of p to the renderer

Ref; drone-plugins#32
@SpotlightKid
Copy link

SpotlightKid commented Jul 23, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants