Thanks for sharing! It is definitely a way to go. I saw there is a 
auto-merge plugin for gerrit and I was trying to build it, but it wasn't 
able to do buck build with latest gerrit version and it looks like the 
previous gerrit version was having some bug so it wasn't able to build as 
well. Adding a hook sounds like a good way to go. :)

Best,
Zhaobang

On Tuesday, February 9, 2016 at 10:53:09 PM UTC-8, Indra Gunawan (ingunawa) 
wrote:
>
> In one of the team I enabled for Git/Gerrit, we have 1st job that is 
> triggered by Gerrit’s patchset/changeset upload event.  
> It reports build status back to Gerrit but we intentionally set the job 
> not to give any vote.
>   
> Next we have a 2nd job that is triggered by Gerrit's "Comment  is added” 
> event where +2 Code-Review is given by reviewer.
> This job reports the build status back to Gerrit and give a +1 or -1 
> Verified vote based on build result.
>
> Lastly on Gerrit, we implement comment-added hook where it fires when a 
> comment is added;  it checks if +2 CR and +1 Verified are given; if it is 
> then it executes Gerrit review command to submit.
>
> From: <jenkins...@googlegroups.com <javascript:>> on behalf of Zhaobang 
> Liu <liuzhao...@gmail.com <javascript:>>
> Reply-To: "jenkins...@googlegroups.com <javascript:>" <
> jenkins...@googlegroups.com <javascript:>>
> Date: Tuesday, February 9, 2016 at 2:30 PM
> To: "jenkins...@googlegroups.com <javascript:>" <
> jenkins...@googlegroups.com <javascript:>>
> Subject: Question about gerrit trigger - Gerrit Verified Commands
>
> Hi there, 
>
> We are trying to add some more automation from jenkins to gerrit. 
> Currently our jenkins is sending verified and code review value to gerrit 
> using gerrit trigger plugin. It's like
> gerrit review <CHANGE>,<PATCHSET>--message 'Build is successful 
> <BUILDS_STATS>'--verified <VERIFIED>--code-review <CODE_REVIEW>
>
> We want Jenkins be able to merge the code as well. We were expecting that 
> we can just do
> gerrit review <CHANGE>,<PATCHSET>--message 'Build is successful 
> <BUILDS_STATS>'--verified <VERIFIED>--code-review <CODE_REVIEW>--submit
>
> However, all of other arguments are working but not --submit. If we do it 
> from command line to ssh to gerrit and run gerrit review, the command works.
>
> We took a quick look at the code of gerrit-trigger but it looks like it is 
> parsing the message, verified value and code review value but not submit. 
> Am I correct?
>
> If you are using gerrit, how do you get code merged? Thanks for sharing 
> the information.
>
> Best,
> Zhaobang
>
> -- 
> 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 <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/86b34f0d-0753-4c38-a856-e4d022e76b52%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/86b34f0d-0753-4c38-a856-e4d022e76b52%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/d344a387-b681-4b6a-bef7-bcb35340e02b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to