Hello, I'm trying to integrate Jenkins with Jira to trigger a Jenkins job after a transition.
I've tried using multiple plugins and creating my own webhook and keep getting the same 404 error with all methods:
httpclient-callbacks:thread-75 WARN anonymous 1140x30x1 1bvkbgt 172.17.0.1 /secure/SetupLicense.jspa [c.a.webhooks.plugin.PublishTaskFactoryImpl$PublishTaskImpl] Client error - 404 when posting to web hook at 'http://localhost:8080/generic-webhook-trigger/invoke?token=qwer1234'
I've read through multiple posts but none have solved my problem. I can curl the same link with a POST request and trigger the job. I can paste the link into a web browser and trigger the job. Jira is validated successfully in my Jenkin's configuration (add Jira sites) and has HTTP enabled. I have tried using an authenticator (http://admin:api-token@localhost:8080/generic-webhook-trigger/invoke?token=1234asdf) with no luck. I have also tried both GET and POST requests in Postman, which both also trigger jobs.
Does anyone know what might be going on? I'm running out of ideas on what to do at this point :<
Thank you for your help!
Okay, so I managed to figure out the problem and will post my solution here in case anyone needs it. So the Jira and Jenkins services are running on containers and need to talk to one another, not through localhost but through an internal ip with an exposed port. I had Jenkins running locally but Jira was trying to reach it from within the VM, which is why I was getting a 404 error. It was looking at Jira's localhost (duh!). Once I configured some security settings and exposed the internal ip/port of the Jenkins instance, they were able to connect :)
Hello Em,
How did you do this: Once I configured some security settings and exposed the internal ip/port of the Jenkins instance, they were able to connect :) ?
|
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.