[Ci-users] Triggering job after PR close

Tue Sep 25 11:00:32 UTC 2018
Barak Korren <bkorren at redhat.com>

בתאריך יום ג׳, 25 בספט׳ 2018, 11:46, מאת Tibor Dancs ‏<tdancs at redhat.com>:

> Hello,
> We are facing a curious issue. We have a job that needs to be triggered
> when PR is closed (either merge or close).
> Unfortunately Jenkins Github Pull Request Builder plugin does not support
> that event (yet?) so there are no triggers available for PR close (even
> though it has triggers for commit).
> Do you have any experience with this particular problem? Have you ever
> handled these github events or made a webtask hooking those webhooks?
> Any information is welcome.


We faced exactly this issue when porting STDCI [1] to GitHub. What we ended
up doing is use the generic webhook plugin [2] and make it trigger a single
job that inspects the input and triggers the proper job for the event we've
got. Source code for the triggering job can be found here [3] and here [4].

[2]: https://wiki.jenkins.io/display/JENKINS/Generic+Webhook+Trigger+Plugin
(the standard-webhook-trigger template)

Barak Korren.

Tibor Dancs
> _______________________________________________
> Ci-users mailing list
> Ci-users at centos.org
> https://lists.centos.org/mailman/listinfo/ci-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/ci-users/attachments/20180925/deae6700/attachment-0003.html>