Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56859

I get 400 error While pushing Cucumber Report to slack from Jenkins

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hello All, i was trying to send cucumber report generated in a Jenkins job to Slack. I have integrated cucumber slack notifier plugin https://wiki.jenkins.io/display/JENKINS/Cucumber+Slack+Notifier+Plugin. and followed the instructions. I am not using a pipeline. But a Jenkins job and configured the webhook in the global configurations as well. In the job configuration, as post-build action i have added Cucumber Slack notification and kept the channel name and the Cucumber.Json path as well. But i get 400 error. When i try sending the message to slack from my windows machine using this command, `curl -X POST -H "Content-type: application/json" --data "{\"text\":\"Hello world\"}" MY-WEBHOOK-URL`, the same message gets posted to slack. I am wondering why the Json payload is not being sent to slack channel. My jenkins also installed on Windows Could you give your valuable suggestions on this?

       

      I get below error

      ERROR: Build step failed with exception
      java.lang.RuntimeException: Received HTTP Status code [400] while posting to slack
      at org.jenkinsci.plugins.slacknotifier.SlackClient.postToSlack(SlackClient.java:62)
      at org.jenkinsci.plugins.slacknotifier.SlackClient.postToSlack(SlackClient.java:54)
      at org.jenkinsci.plugins.slacknotifier.SlackClient.postToSlack(SlackClient.java:41)
      at org.jenkinsci.plugins.slacknotifier.CucumberSlackService.sendCucumberReportToSlack(CucumberSlackService.java:33)
      at org.jenkinsci.plugins.slacknotifier.CucumberSlackPostBuildNotifier.perform(CucumberSlackPostBuildNotifier.java:67)
      at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      at hudson.model.Build$BuildExecution.post2(Build.java:186)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      at hudson.model.Run.execute(Run.java:1841)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            garethjevans Gareth Evans
            Reporter:
            ansjenkins Ansar SN
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: