Setting up a Jenkins notify webhook using rcextensions?

Mads Kiilerich mads at kiilerich.com
Wed Sep 23 20:13:17 UTC 2015


On 09/23/2015 09:14 PM, Robert Rauch wrote:
> Hi,
>
> I'm currenty trying to setup a generic post-push hook in Kallithea (i.e.
> one that works both for git and mercurial repositories) using rcextensions.
>
> Unfortunately, I have not found much documentation on this and I got
> stuck. I've put a directory named 'rcextensions' in the directory where
> Kallitheas ini configuration file resides, containing a file named
> `__init__.py` with the following contents:
>
>    import logging
>
>    logger = logging.getLogger(__name__)
>
>    def _pushhook(*args, **kwargs):
>        logger.info("entering _pushhook")
>        pollJenkins(**kwargs)
>        return 0
>
>    PUSH_HOOK = _pushhook
>
>    def pollJenkins(**kwargs):
>      ...
>
>    logger.info("rcextensions loaded")
>
>
> After restarting Kallithea, the line "rcextensions loaded" pops up in
> the Kallithea logfiles, however, the PUSH_HOOK doesn't seem to get
> triggered when pushing to some repository. What's the problem?

Not a real answer, but have you checked 
https://github.com/moparisthebest/kallithea-hooks ?

At a meta level, I'm sure something there or your experience will be 
valuable to get upstreamed in code or documentation.

A quick (for me) advice on figuring this out would be to add some print 
statements or crashing statements to kallithea/lib/hooks.py ...

/Mads


More information about the kallithea-general mailing list