So, this is what I've done so far:
- Created GitHub personal access token with God's permissions (except delete repos)
- Associated personal access token in Jenkins > Manage Jenkins > Configure System> GitHub , I test it and says "Credentials verified for user dim_user, rate limit: 4998"
- Checked "Manage hooks"
- In Source Code Management I set it like this:
- Repository URL:
[email protected]:ORG_NAME/bootcamp_databases
- Credentials:
- none -
(I'm using local's Git config file and id_rsa private key)
- Repository URL:
- Also in "Build triggers" I've checked "GitHub hook trigger for GITScm polling" which refers to the old "Build when a change is pushed to GitHub"
- I am able to Manually build it and it works perfectly (gets source code from GitHub and deploys everything)
- In the project's GitHub Hook Log it shows: "Polling has not run yet"
- GitHub recent Webhook deliveries are successful
Jenkins Logs (jenkins.err)
Jul 17, 2019 10:11:31 AM org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber onEvent
INFO: Received PushEvent for https://github.com/ORG_NAME/bootcamp_databases from XXX.XX.115.71 ? http://XXXXXXXX.ngrok.io:8080/github-webhook/
Project item: Freestyle
Jenkins Version: 2.176.1
I've tried these and did not help:
- https://issues.jenkins-ci.org/browse/JENKINS-35132
- https://issues.jenkins-ci.org/browse/JENKINS-41377
Actual:
Expected:
To actually fetch the code when pushing to GitHub and triggering the jenkins build.
What am I missing, all of the above points were solutions on other stackoverflow questions but so far not good.