Hi,

I'd love to use this plugin instead of Gerrit Trigger plugin, but I don't 
get the branch indexing happening no matter what URL I define in Gerrit 
webhook (best to use <Jenkins URL>/gerrit-webhook I guess).  I wonder if 
I'm hitting these 2 issues and if any work is done for them:
https://issues.jenkins-ci.org/browse/JENKINS-54212

https://issues.jenkins-ci.org/browse/JENKINS-60965

I also wonder if having Gerrit Trigger plugin installed interferes with 
this plugin somehow. I don't know if some jobs in our Jenkins use Gerrit 
Trigger.

Cheers,
-Pasi

On Wednesday, August 7, 2019 at 10:49:42 AM UTC+3, Luca Milanesio wrote:
>
> Hi Amit,
> this message is more for the Jenkins mailing list. However, as I am 
> watching actively both, I'm happy to answer :-)
>
> On 6 Aug 2019, at 06:57, amit r <amitri...@gmail.com <javascript:>> wrote:
>
> Hi All, 
>
>
> i'm not sure who to send this so trying here to get some answer for my use 
> case..
>
> i'm trying to use the plugin gerrit-code-review-plugin  in my project 
> using multi branch pipeline.
> installed all the pre plugins in order to use it  but as mentioned in the 
> wiki page:
>
> https://wiki.jenkins.io/display/JENKINS/Gerrit+Code+Review+Plugin 
> not clear enough how to use it from scratch.
> i assumed that need the gerrit trigger section in my jenkinsFile  so did 
> this one:
>
> triggers {
>     gerrit(
>             serverName: 'Gerrit Server',
>             gerritProjects: [[
>                                      compareType                           : 
> 'ANT',
>                                      pattern                               : 
> 'env.GERRIT_PROJECT',
>                                      branches                              : 
> [[
>                                                                               
>         compareType: 'REG_EXP',
>                                                                               
>         pattern    : 'env.BRANCH_NAME'
>                                                                               
> ]]
>                              ]],
>             triggerOnEvents: [
>                     changeMerged(),
>                     patchsetCreated()
>             ],
>             skipVote: [
>                     onSuccessful: false,
>                     onFailed    : false,
>                     onUnstable  : false,
>                     onNotBuilt  : false
>             ]
>     )
> }
>
>
> The above example doesn't match any of the other examples mentioned in the 
> Gerrit Code Review plugin.
>
> See the scripted and declarative pipelines examples at:
> https://github.com/jenkinsci/gerrit-code-review-plugin
>
>  but now no matter what happens - i never get any event for the merged one 
> - only for patchsetCreated
>
> 1. is there something i'm missing here?
> 2. does this plugin should support this cases?
>
>
> Yes, it is designed for being used in a multi-branch pipeline.
>
> 3. how can i still use the branch scanning that exist in multibranch 
> pipeline in case i also have cases that my automation push code into gerrit 
> so will have here endless loop...
>
>
> Endless loop? Can you clarify the details?
>
> 4. what about webhooks in gerrit it self? is it something different? 
>
>
> Webhooks can be used to trigger the branch reindexing also.
> Just configure them in Gerrit to point to Jenkins's URL /gerrit-webhook
>
> HTH
>
> Luca.
>
>
> any help with this will save my day! i'm trying to resolve these issues 
> for long time with not much luck...
>
> many thanks in advance!!
> Amit Rintzler 
>
> -- 
> -- 
> To unsubscribe, email rep...@googlegroups.com <javascript:>
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to repo-d...@googlegroups.com <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/repo-discuss/12c7c061-8ffa-444f-a277-ec34b66c6dc3%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/repo-discuss/12c7c061-8ffa-444f-a277-ec34b66c6dc3%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4ecfc9ce-62b5-4f0c-a979-2b85b436573d%40googlegroups.com.

Reply via email to