Open vermasumeet1982 opened 7 years ago
Did you set github project job property?
Thanks for prompt reply. Can you point out where do I set it?
Yes that is done with the Git repository name and I know it works if I trigger the job manually. The display name field is empty
Display name unrelated. And did you set global user that has access to your repo?
yes. if i trigger the job manually it works. So I know the credentials are working
git credentials unrelated, Trigger has repoprovider that searches for gh connection. It uses global settings....
ok let me check
You need login under user and check that it has no pending invintations.
the credentials I am using to access the repo is under Jenkins (global) domain and it has no pending invitations
Ah, it fails create repository for job... Is it new job or existed?
new
Maybe connection was bad and cached #175 ... will do release now
cool. let me know when done, I will upgrade the plugin and run it again
when will the update be available via Jenkins Plugin Manager?
release in process, if you install Jucies update center it should appear very fast: my release, checkbox on github, build on jitpack and available in jucies. In main jenkins update center it appears only tomorrow.
0.1.0-rc17 installed. That exception is gone but trigger still not occuring
should i check or uncheck cache connection in github plugin repository provider?
Cache makes sense only if it found wrong connection. How much users do you have in global settings? Did you restart your jenkins? Do you have anything in global jenkins log?
yes I did restart. I did get this after some time at the end of the event
Stopping 'Build GitHub Pull Requests' for project 'qa_pipeline_step1'
Dec 09, 2016 6:58:32 PM INFO org.jenkinsci.plugins.github.pullrequest.GitHubPRTrigger start
Starting GitHub Pull Request trigger for project qa_pipeline_step1
So something happened but job didn't trigger. I have removed the refspec for testing and specified a fix branch in branch specifier just for test purpose
is the refspec and branch to build in above screenshots correct?
You can even not specify git at all. Trigger self containing. What is written in "polling log" when you manually press run trigger from "github PRs" page?
sorry was this "You can even not specify git at all." a question? I don't understand what u mean by manually press trigger from"github PR" page? Do you mean writing a comment on the PR?
Should I email you the log to your gmail address? And by log I mean the Jenkins System Log. Nothing is appearing in the github hook log on the job page
ok I need to go now. Its very late on friday evening. I will check pick this up again on Monday. Have a good weekend and thanks for your help
Thanks, will reply with screenshots, busy atm
thanks
Must be specified
And global settings should be set as described in github-plugin
hello @KostyaSha both these settings are specified correctly (is checking manage hooks mandatory? I am not managing webhooks from jenkins). I know jenkins is receiving webhooks because I can see the packets in the jenkins log. Can you also screenshot the refspec. I want to confirm I have specified the branch and refspec correctly.
disable SCM, it not needed for triggering.
What job type do you use?
This is my build trigger. It is a freestyle project
I think problem is somewhere around refspec and branch. Could you screenshot those so I can compare with my settings.
Set only github project property and only PR trigger, don't set anything else. Don't set "when pushed to github". Ensure that you have right global settings with right user. I run fresh jenkins and setup everything the same - it works fine.
hey I found the reason
There are 2 tabs where u can comment in github.
If you comment in "Conversations" tab Github sends issue_comment event.
Header X-GitHub-Event -> issue_comment
If you comment in "Files Changed" tab, Github sends pull review comment event.
Header X-GitHub-Event -> pull_request_review
Dec 12, 2016 1:53:12 PM FINE org.jenkinsci.plugins.github.webhook.GHEventHeader$PayloadHandler parse
Unknown event - No enum constant org.kohsuke.github.GHEvent.PULL_REQUEST_REVIEW
Dec 12, 2016 1:53:12 PM FINE org.jenkinsci.plugins.github.webhook.GHEventHeader$PayloadHandler parse
Header X-GitHub-Event -> pull_request_review_comment
I think your plugin looks for issue_comment event and not the Pull Request comment. I think it would be better if you update the plugin to handle pull request review comment or mention this in the documentation.
Many thanks for your support. I will close this after some more checking
M.... It should be pretty simple to make new event that will check PR review comments. Local storage saves anything needed for next check point, but i not sure that all this comments are very linear like conversation. If you want implement it i can guide you. For more than year you are the first who tried to trigger build via review comment :)
We have our gitflow setup like that. I wanted to deliver a release to QA team before PR is merged. And that's how I came across this plugin. For now please document this in your Configuration.doc file. I will contact you if I want to upgrade this plugin.
Although I should have figured it out earlier as your plugin logging does say
Unknown event - No enum constant org.kohsuke.github.GHEvent.PULL_REQUEST_REVIEW
I was just looking at the wrong place :)
You can keep issue open.
Hello I have been trying to get the build trigger when I comment on pull request to work. Attached are the job configurations. I know I am getting the webhooks from github because I can see that in Jenkins logs and also the github push event is working.
Also pasted below is jenkins log around an exception thrown when pull request review comment event is received. I have tried everything to make this work but not sure what the problem is. I think there is a bug in the plugin