Hello, I looked through the README.md file for this plugin and doesn’t look like there’s any insight on if and how you can send variables as a response body. For my use case, I want to send the project and build number to Mattermost. There is a Mattermost plugin already, but it seems as though I keep coming up to a “Failure” error and it’s not very helpful because that’s all it sends back.
I looked into using HTTP request plugin and that actually does seem to be sending notifications to my Mattermost channel. The issue is I don’t know if the HTTP request plugin supports passing in variables from either Jenkins or environment variables.
I want to send a notification to my Mattermost channel using something like this.
I’m not trying to create a pipeline job like that though. I’m using Fresstyle and I have other things I want the project to do when the build has been successful for instance send email notifications, run an archive process, etc. Sending notifications to my Mattermost channel is one of them as well as storing the code in a local workspace on my Jenkins server.
I can’t imagine anyone here has experience with that plugin outisde of pipeline. If the plugin doesn’t work for you, i recommend doing something with shell + curl, since you got full access to all variables in shell blocks in freestyle.
It just really sucks because the Mattermost plug-in that’s available was very promising since it sends notifications based on a lot of things. Only issue I’m having is when I try to run a “Test Connection”, all it sends back is “Failure” and it’s like “ok, is it failure due to incorrect configurations or failure due to network issues or failure due to other things?” There’s soooooo many things that “Failure” could mean. I’ve also looked at the raw response it sends back and it’s just “Failure”.
From what it may look like, seems like it could be an SSL issue on my side. The issue though is that I’ve already added the ca bundle cert for Mattermost into both the trusted store and the default cacerts files on the Jenkins server. I’ve rebooted the VPS itself as well as added the Mattermost IP address to /etc/hosts and I keep coming to the “Failure” error message.
That’s the only reason why I switched to trying to run the notifications using this HTTP Request plug-in.