-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notify github pull requests #131
Conversation
Needed so that Jenkins can notify GitHub about job status. See: plone/jenkins.plone.org#131
@gforcada awesome! I don't have any objections to install pygithub globally. Regarding the error handling, I would prefer specific try/excepts that can tell us exactly what went wrong. |
this is great! |
Ignore any status notification, I'm using this pull request to test itself on jenkins :-) |
8d036e8
to
215d922
Compare
@plone/testing-team could you review this? The upside is that now we are checking that everything works as expected, and if not a clear message is given. The downside is that it PostBuildScript Jenkins Plugin does not have the result of the job as environment variable, thus making it totally useless for us (i.e. we can not report back to github...) There is another plugin Global Post Script which does know how the job ended, but alas, you can not import system-wide python packages (so no pygithub)... we could try to do that with plain URL calls... Any idea of another plugin that could fit in here? We can always create a mr.roboto view that handles that for us, the Global Post Script plugin should call it with all the needed information (pull requests + build status + build URL)... |
Can't we just wrap the post-notification into a buildout script that runs on the jenkins nodes? We should not invest too much into evaluating plugins in my opinion. When we move to the workflow-plugin jobs, this might become useless. |
You mean to create a script on buildout.coredev that gets called after running the tests, it inspects them and then reports back to github? That could work, sure, we can pass everything via environment variables, but we need to get the test results... |
215d922
to
1a9295c
Compare
It doubles as typos/errors reporting tool whenever someone makes a mistake when creating a pull request job.
58a188e
to
217cfcb
Compare
@tisto I just took a simpler approach (I did not like to have a script on Jenkins to report that a job was started and another on buildout.coredev to report that it finished). Now both scripts are on Jenkins. The only thing I'm not 100% happy with is how I account for job failure... is there any other nicer way to gather that information? If not we can merge and deploy. The only remaining part will be to start jobs automatically, which we can revive on mr.roboto... |
Let's give it a try! |
Reporting works: plone/Products.CMFPlone#1271 |
@tisto btw. I had to reconfigure xvfb... maybe due to the plugin updates? |
I just did the same. :) Yes, I guess so... |
@gforcada AWESOME!!! |
🍹 |
Works: plone/Products.CMFPlone#1271 |
wow, that's really great work! and it will make work with PRs much easier. thx a lot |
@jensens that's the idea yes, now we only need to recover the pullrequest commit hook from mr.roboto and all pull requests will be fully automated :-) |
@gforcada i'am not sure if it is ok load-wise to test every push on a PR branch? We may need more executors then. |
@jensens I think we could handle that. Either by adding more nodes or restricting the number of parallel pull request builds. |
@jensens if it takes more time, so be it, although it usually is not that busy and the amount of pull requests per day is not that high, only during sprints/release time is when jenkins is at full capacity... And for releases we need to not trigger jenkins on zest.releaser commits (there's an issue for that already). |
Use the pre-script to notify the given pull request(s) that a jenkins
job has been started.
Do the same after the jenkins job has been running to let github
know if the run was successful or not.
Another building block to fully automate testing jenkins jobs for pull
requests.
Some caveats: