We internally use GitHub Enterprise and Jenkins. If I push on the main repository it is automatically build without and the Commit is marked as correct (just as Travis does this).
However, I want to be able to fork a repository and let the Jenkins build run. Is it possible to say Jenkins that he also runs any fork of the project when opening a PR on the main repo?
1 Answer 1
There's a mercurial plugin for Jenkins that does this, it works by polling on all branches for updates to the configured project, and building whichever branch changed. Makes sense to me, and I wish it was updated to work with git and subversion.
IIRC Bamboo (the JIRA CI server) does this out-of-the box.
However, if you want this to occur if you forked the repository, ie you take code from repoA and put into repoB, then no - how would any system recognise that your project is ancestrally related to a different repository?
-
Thanks for your answer. Travis knows how to do it so it should be possible. Our jenkins also works like the Plugin you described it looks on all pushes and gets notified by GitHub. I think there is also a possibility to detect pull requests.btype– btype2014年03月28日 15:45:43 +00:00Commented Mar 28, 2014 at 15:45
-
@btype I think the Jenkins plugin is FOSS, so you could take it and modify it to suit you (I don't use git,and I don't code Java or I would have by now, but you might find it quite easy to change the mercurial calls to git equivalents)gbjbaanb– gbjbaanb2014年03月28日 15:53:17 +00:00Commented Mar 28, 2014 at 15:53