Yes, I know there are many like this one, but non of the answers work for me and I'm starting to get too stressed.

I'm starting to experiment with Jenkins. It seems the preferred option for CI out there. After all literally 10s of of times trying to get it integrated with Github I'm defeated. No matter if I chose manual or auto-manage webhooks, it does not work. I'm using Jenkins 1.532.1, last stable version as today. I have installed all the required plugins: Github OAuth, Git Plugin, Github Plugin, etc. I have changed the configuration 10s of times. I have gone through Jenkins and the plugins docs (some not very well documented) as many even more times. I don't know what else to do but to ask here to see if someone can show me the light.

I can see in Jenkins logs that the webhook is working and it is receiving the payload from Github, just don't trigger the build.

Received POST for https://github.com/mycompany/my-project

What I need, finally, is to know exactly what plugins I need installed, how to specifically set up Jenkins and the plugins and any other detail, no matter how minimal it can appear. I can see the documentation, for the plugins especially, is lacking lots of details.

Please, don't refer me to another question because I have read many times many similar questions and I'm still in darkness.

有帮助吗?

解决方案

Well, after digging, and digging more, I came to the solution. Not happy though. I had to take the passphrase off my SSH Key and stop using an alias for github.com. The problem was that as I was using an alias, the address for the Github repo getting in on the payload didn't match with the address I had in my project. Now I'm using the normal address: git@github.com/my-company/my-project.git and it is working. I had to take the passphrase off the SSH key for it to work though, which I'm not happy with.

其他提示

  1. Create a user in Jenkins.
  2. in GitHub, in settings for the repo, got to webhooks and set the Payload URL. ex:

    http://<jenkins user>:<password>@<jenkins.server.url>:<port>/github-webhook/
    
    http://me:Password!!@jenkins.blablabla.com:81/github-webhook/
    
  3. In Jenkins set the trigger to Build when a change is pushed to GitHub.

  4. Check your plugins. You need at least Git plugin 2.4.0 and GitHub plugin 1.11.1. (If everything is working but changes aren't triggering it's probably the Git plugin. There was a bug fix for that in 2.4.0)

Have you worked through the examples in this book: Jenkins: The Definitive Guide it uses Git in the examples.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top