git plugin - pulling in pull requests from Stash

88 views
Skip to first unread message

John D. Ament

unread,
Aug 11, 2013, 12:17:16 AM8/11/13
to jenkins...@googlegroups.com
Hi

We're playing around with git at work, and I've been working with Jenkins for a long while (though this is the first time I'm having an issue that didn't seem to work as expected).

Using the git plugin, I'd like to polling for remotes that match the pattern refs/pull-requests/*/merge . See below for a list of what I'm seeing:

$ git ls-remote http://foo@localhost:7990/scm/foo/foo_1.git | grep "refs/pull-requests/" | grep "merge" | grep -v "clean"
Password for 'http://foo@localhost:7990':
6de02b00d273df20ea639f085ad921f070cf1212        refs/pull-requests/1/merge
3b5530128e1c5fecf27fa76b11d92e8c1967ac29        refs/pull-requests/2/merge

I set this as my branch in the git settings, but I'm pretty sure it's wrong.  So is there a way to tell the git plugin in Jenkins to pull from these locations?

Thanks!

Vincent Latombe

unread,
Aug 12, 2013, 7:24:37 AM8/12/13
to Jenkins Users
Hi,

I don't have all the settings in mind, but you need to tweak the refspec to achieve this. Also, it may be better to fetch refs/pull-requests/*/merge-clean because you'll always get a non-conflicting commit.

Vincent


2013/8/11 John D. Ament <john.d...@gmail.com>

--
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/groups/opt_out.
 
 

John D. Ament

unread,
Aug 12, 2013, 7:50:30 AM8/12/13
to jenkins...@googlegroups.com
Well, the first issue I ran into is that the git plugin won't accept
refs/pull-requests/*/merge, saying it's an illegal wildcard.
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/YtGL1UYPJ_E/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
Reply all
Reply to author
Forward
0 new messages