4

Currently trying to automate the job build process to every github push. I have did the following steps to automate still it's not getting automated. what I am missing I did not get.

  1. installed Github Integration plugin

  2. in github for this repository integration added the service webhook url as http://{IP Address}:{PORT}/github-webhook

  3. in Jenkins server created ssh key for the user jenkins and added that into this repository deploy keys.

  4. to check the ssh connection ran the command - ssh git@github.com. it successful.

  5. in jenkins setup enter image description here

  6. Build Trigger enter image description here

  7. after the push in github services it showing it was successful but in jenkins not triggered.

What am I missing?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Pranavadurai
  • 990
  • 2
  • 12
  • 28
  • What error are you facing? @Pranavadurai – Tanvi Garg Jun 20 '18 at 09:10
  • @TanviGarg after git push.automated build not getting submit. – Pranavadurai Jun 20 '18 at 09:35
  • Its mentioned that Integration services in Github would be replaced in the near future by Webhooks. It's really easy to integrate webhooks and basically does the same push notification option as well. Might as well try that. – gtrip Aug 28 '18 at 01:34

3 Answers3

3

Have you tried running "Test Hook"? Did it come back with a response?

There is a check box near the bottom of the authentication section labeled “Prevent Cross Site Request Forgery exploits” that needs to be unchecked in order for this particular method to work.

It looks like this

Arun.D
  • 406
  • 1
  • 5
  • 17
2

Firs of all You Need to setup github with jenkins in below section also

Go to Github --> click on profile dropdown --> settings --> devloper settings --> personal access token --> generate new token --> select all scopes --> copy the token

Then go to Jenkins --> manage Jenkins --> github settings --> add user --> Select secret text--> paste the token

Then Test the git-hub connection by clicking test button If its Successful the Jenkins will trigger whenever you commit to git-hub

sachin_ur
  • 2,375
  • 14
  • 27
2

Make sure all of these things are done correctly for me it was just .git missing at the end of repository url

  1. use https://github.com/user/repo.git instead of https://github.com/user/repo in project url field
  2. make sure if you are using reverse-proxy headers check if the values are correct for proxy
  3. make sure jenkins -> configure global security -> csrf protection -> check the box for proxy compatibility