kasunkv / slack-notification

Slack Notification task with advanced slack message customization for Visual Studio Team Services
MIT License
20 stars 9 forks source link

Can't get it to publish #20

Open tgatomic opened 5 years ago

tgatomic commented 5 years ago

Have been trying the whole day to get the extension to publish to our channel but can't get it to work. I've been trying the plugin from Booliba Labs and that works just fine, but we want to use your features.

kasunkv commented 5 years ago

Hi @tgatomic Can you please let me know the error you are facing? some more details would help in troubleshooting. If you can share the log output for the task with diagnostics enabled by setting System.debug variable to truein your Azure Pipeline build that will give valuable information. If possible also attach a screenshot of the task's configuration values.

tgatomic commented 5 years ago

Hello,

Thank you for fast reply. This is the log: 2019-01-15T15:57:33.8911184Z ##[debug]Evaluating condition for step: 'Post Slack Notification' 2019-01-15T15:57:33.8911957Z ##[debug]Evaluating: succeededOrFailed() 2019-01-15T15:57:33.8912056Z ##[debug]Evaluating succeededOrFailed: 2019-01-15T15:57:33.8916203Z ##[debug]=> True 2019-01-15T15:57:33.8916458Z ##[debug]Result: True 2019-01-15T15:57:33.8916621Z ##[section]Starting: Post Slack Notification 2019-01-15T15:57:33.8921844Z ============================================================================== 2019-01-15T15:57:33.8921910Z Task : Slack Notification 2019-01-15T15:57:33.8921969Z Description : Slack Notification task with advanced slack message customization for Azure DevOps. The task includes the ability to send optional attachments with the standard slack messages 2019-01-15T15:57:33.8922017Z Version : 5.0.19 2019-01-15T15:57:33.8922055Z Author : Kasun Kodagoda 2019-01-15T15:57:33.8922114Z Help : More Information 2019-01-15T15:57:33.8922192Z ============================================================================== 2019-01-15T15:57:34.1161859Z ##[debug]agent.TempDirectory=D:\a_temp 2019-01-15T15:57:34.1192519Z ##[debug]loading inputs and endpoints 2019-01-15T15:57:34.1198873Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN 2019-01-15T15:57:34.1209145Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION 2019-01-15T15:57:34.1212377Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION 2019-01-15T15:57:34.1214633Z ##[debug]loading INPUT_AUTHORLINK 2019-01-15T15:57:34.1216178Z ##[debug]loading INPUT_AUTHORNAME 2019-01-15T15:57:34.1217882Z ##[debug]loading INPUT_CHANNEL 2019-01-15T15:57:34.1219803Z ##[debug]loading INPUT_COLOR 2019-01-15T15:57:34.1222982Z ##[debug]loading INPUT_MESSAGE 2019-01-15T15:57:34.1224522Z ##[debug]loading INPUT_MESSAGEAUTHOR 2019-01-15T15:57:34.1225783Z ##[debug]loading INPUT_NOTIFICATIONTYPE 2019-01-15T15:57:34.1227032Z ##[debug]loading INPUT_PRETEXT 2019-01-15T15:57:34.1228407Z ##[debug]loading INPUT_SHOWFOOTERTIMESTAMP 2019-01-15T15:57:34.1230856Z ##[debug]loading INPUT_SLACKAPITOKEN 2019-01-15T15:57:34.1234462Z ##[debug]loading INPUT_TEXT 2019-01-15T15:57:35.2282889Z ##[debug]loading INPUT_TITLE 2019-01-15T15:57:35.2286793Z ##[debug]loading INPUT_TITLELINK 2019-01-15T15:57:35.2287031Z ##[debug]loading INPUT_UPLOADFILEPATH 2019-01-15T15:57:35.2287188Z ##[debug]loading INPUT_USEVARIABLEFORMESSAGE 2019-01-15T15:57:35.2287360Z ##[debug]loading INPUT_USEVARIABLEFORPRETEXT 2019-01-15T15:57:35.2287506Z ##[debug]loading INPUT_USEVARIABLEFORTEXT 2019-01-15T15:57:35.2287667Z ##[debug]loading SECRET_SLACK_APIKEY 2019-01-15T15:57:35.2287808Z ##[debug]loaded 21 2019-01-15T15:57:35.2287969Z ##[debug]Agent.ProxyUrl=undefined 2019-01-15T15:57:35.2288111Z ##[debug]Agent.CAInfo=undefined 2019-01-15T15:57:35.2288268Z ##[debug]Agent.ClientCert=undefined 2019-01-15T15:57:35.2288408Z ##[debug]Agent.SkipCertValidation=undefined 2019-01-15T15:57:35.2288578Z ##[debug]check path : D:\a_tasks\SlackNotification_705424a3-ef1f-4c70-8dd0-56a63772146c\5.0.19\task.json 2019-01-15T15:57:35.2288820Z ##[debug]adding resource file: D:\a_tasks\SlackNotification_705424a3-ef1f-4c70-8dd0-56a63772146c\5.0.19\task.json 2019-01-15T15:57:35.2288973Z ##[debug]system.culture=en-US 2019-01-15T15:57:35.2289774Z ##[debug]MessageAuthor=Azure 2019-01-15T15:57:35.2289981Z ##[debug]Channel=@Bask 2019-01-15T15:57:35.2290259Z ##[debug]SlackApiToken=* 2019-01-15T15:57:35.2290448Z ##[debug]UploadFilePath=D:\a\1\s 2019-01-15T15:57:35.2290668Z ##[debug]Message=Test to see if this works? 2019-01-15T15:57:35.2290843Z ##[debug]UseVariableForMessage=false 2019-01-15T15:57:35.2291039Z ##[debug]IconUrl=null 2019-01-15T15:57:35.2291230Z ##[debug]AuthorName=Christoffer 2019-01-15T15:57:35.2291508Z ##[debug]AuthorLink=test 2019-01-15T15:57:35.2291704Z ##[debug]Title=Test title 2019-01-15T15:57:35.2291881Z ##[debug]TitleLink=test 2019-01-15T15:57:35.2292070Z ##[debug]PreText=test 2019-01-15T15:57:35.2292246Z ##[debug]UseVariableForPreText=false 2019-01-15T15:57:35.2293908Z ##[debug]Text=test 2019-01-15T15:57:35.2294057Z ##[debug]UseVariableForText=false 2019-01-15T15:57:35.2294215Z ##[debug]Color=#439FE0 2019-01-15T15:57:35.2294354Z ##[debug]ImageUrl=null 2019-01-15T15:57:35.2294512Z ##[debug]FooterText=null 2019-01-15T15:57:35.2294667Z ##[debug]FooterIcon=null 2019-01-15T15:57:35.2294823Z ##[debug]ShowFooterTimestamp=false 2019-01-15T15:57:35.2294963Z ##[debug]NotificationType=ChatMessage 2019-01-15T15:57:35.2295120Z ##[debug]FileTitle=null 2019-01-15T15:57:35.2295257Z ##[debug]FileComment=null 2019-01-15T15:57:35.2295448Z ##[debug]{"slackApiToken":"**","messageAuthor":"Azure","channel":"@Bask","uploadFilePath":"D:\a\1\s","message":"Test to see if this works?","useVariableForMessage":false,"iconUrl":null,"authorName":"Christoffer","authorLink":"test","title":"Test title","titleLink":"test","preText":"test","useVariableForPreText":false,"text":"test","useVariableForText":false,"color":"#439FE0","imageUrl":null,"footerText":null,"footerIcon":null,"showFooterTimestamp":false,"notificationType":"ChatMessage","fileTitle":null,"fileComment":null} 2019-01-15T15:57:35.2295637Z ##[debug][Monitoring.configure()] Configure called 2019-01-15T15:57:35.2295799Z ##[debug][SlackChannelService.getChannelIds()] Channels/Users found: 1 2019-01-15T15:57:35.2295959Z ##[debug][SlackChannelService.getChannelIds()] Channel name: @Bask 2019-01-15T15:57:35.2296688Z ##[section]Finishing: Post Slack Notification

image

kasunkv commented 5 years ago

Does the task fail or the task completes successfully and the slack message does not arrive at the @Bask user?

tgatomic commented 5 years ago

The task completes successfully but the message doesn't arrive to the user.

leglock commented 5 years ago

I am having the same issue. The task says it completes successfully, but no message arrives in Slack.

Did you ever find a resolution to this @tgatomic / @kasunkv ?

image

tgatomic commented 5 years ago

Sorry @leglock, I never found a solution for it.

atnegrete commented 4 years ago

@tgatomic @leglock If you're using a channel, on the input make sure you have the "#" before it. That was my issue For example, for channel: general Input is: #general

1RGB1 commented 2 years ago

I still have the same issue, can you help please? @kasunkv ?