cloudfoundry-community / slack-notification-resource

Concourse CI resource for sending notifications to Slack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

attachments_file example

epscylonb opened this issue · comments

I was wondering if there is a working end to end example of the attachments_file option.

I'm seeing the following when trying to use it:

{ [5 bytes data]
< HTTP/1.1 100 Continue
} [5 bytes data]
* We are completely uploaded and fine
{ [5 bytes data]
< HTTP/1.1 500 Server Error
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: keep-alive
< Date: Tue, 14 Aug 2018 23:36:39 GMT
< Server: Apache
< Vary: Accept-Encoding
< X-Slack-Backend: h
< Referrer-Policy: no-referrer
< Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
< X-Frame-Options: SAMEORIGIN
< Access-Control-Allow-Origin: *
< X-Via: haproxy-www-ahge
< X-Cache: Error from cloudfront
< Via: 1.1 0e751c49a3c284a13f160ff46b6d9676.cloudfront.net (CloudFront)
< X-Amz-Cf-Id: 8IaxHGIsbgzaSN7gUtplP_JyBw2mYnIVX4meJE5Mc8Bq8VLqhRIHDA==
< 
{ [45 bytes data]
100  1261    0    39  100  1222     39   1222  0:00:01 --:--:--  0:00:01  3522
* Connection #0 to host hooks.slack.com left intact
missing_text_or_fallback_or_attachments

If I set the text param I see that message in slack, but not the attachment.

My payload looks like this:

{"source":{"url":"***REDACTED***"},"params":{"attachments_file":"slack-message/message","channel":"@SOME-USER-ID","metadata":true,"payload_in_metadata":true}}
(I've removed the user id in the above, messages are received by me when setting the text param)

I'm not ruling out an error on my end but I'm starting to wonder if there's a bug somewhere.

Any pointers on how to debug this issue, or a working example would be much appreciated.