Dynamic git URL for Jenkins builds

githubJenkinspull-requests

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?

Best Answer

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?

Related Topic