git-plugin: can it do pull requests (no github)?

36 views
Skip to first unread message

bl0ck3r

unread,
Jan 25, 2015, 10:10:39 PM1/25/15
to jenkins...@googlegroups.com
I was under the impression that by installing the git-plugin, I would be able to support pull requests between two custom local repositories (say file:// - no github here). By that I mean that the git-plugin would clone a "central" repo, fetch a branch from a "forked" repo, and merge them. Then it would let the core of the build run. Then in the post build, the git publisher would push the merge back to the "central" repo if the build was successful (with a tag maybe).

I tried to make the git-plugin do that but it seems I need to write some parts by hand as I cannot get it to fetch from the forked repository. Am I mistaken about the git-plugin? Can it do all of this by itself?

Please do not suggest github, it is not an option (behind a firewall).

Thanks,
Martin

Mark Waite

unread,
Jan 25, 2015, 10:19:38 PM1/25/15
to jenkins...@googlegroups.com
I think I'm doing something close enough to your request that it might be useful to you.

I have a Jenkins job which I use to synchronize copies of the git-client-plugin from its official location on github to unofficial copies on bitbucket, assembla, sourceforge, and google code.  That's not quite the same as what you're requesting, but I think it is very close.  I use the technique so that I have testable copies on multiple providers, in case the authentication systems at one of the git hosting providers behaves differently than others.

One of the jobs is configured to push to a single repository after running a build and test cycle.

The other job is configured to push to three different repositories after running a build and test cycle.

I can share the config.xml definition of the jobs with you, or screen shots of the relevant portions of the configuration page for each of the jobs.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3f47515d-6821-4836-8268-44ce0497eec1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks!
Mark Waite

bl0ck3r

unread,
Jan 25, 2015, 10:45:09 PM1/25/15
to jenkins...@googlegroups.com
Thanks for the offer. Yes, I'd like to see a config.xml. That should help me understand how to use the git-plugin (I think I over estimated what it is meant to do).

Mark Waite

unread,
Jan 25, 2015, 10:50:49 PM1/25/15
to jenkins...@googlegroups.com
You can see the config.xml file at:


Mark Waite

On Sun, Jan 25, 2015 at 8:45 PM, bl0ck3r <martin....@gmail.com> wrote:
Thanks for the offer. Yes, I'd like to see a config.xml. That should help me understand how to use the git-plugin (I think I over estimated what it is meant to do).

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Thanks!
Mark Waite

bl0ck3r

unread,
Jan 26, 2015, 5:27:53 PM1/26/15
to jenkins...@googlegroups.com
Thank Mark. I did not realize your were a maintainer on this plugin until I visited the wiki page. I have decided to learn the Git Plugin by experimenting with it, one baby step at a time. I am confused by the purpose of the refspec, and I have reopened https://issues.jenkins-ci.org/browse/JENKINS-14572.

bl0ck3r

unread,
Jan 26, 2015, 11:32:21 PM1/26/15
to jenkins...@googlegroups.com
I do not understand how the Branch Specifier works when there are two repositories. I think I get it with one repo, but not with two. In the case of two repos, the plugin checks out the master even when I specify a branch. I wrote a short study on my experiment and on how I came to this conclusion: https://docs.google.com/document/d/1GKjD7GCvqUlHAo9Nmqzrlhi6LN8mv6ZnpuYSaTnU13g/edit?usp=sharing

Can you help me understand? Thanks.
Reply all
Reply to author
Forward
0 new messages