[Announce] Gerrit Code Review plugin v0.3.1 is out - supports integration with the Gerrit Trigger Plugin

30 views
Skip to first unread message

Luca Milanesio

unread,
Oct 29, 2018, 4:53:15 AM10/29/18
to Jenkins Developers, jenkins...@googlegroups.com, Repo and Gerrit Discussion, Luca Milanesio, Alon Bar-Lev
Hi all,
I am pleased to announce that after the Jenkins World 2018 summit in Nice last week, the Gerrit Code Review plugin (https://wiki.jenkins.io/display/JENKINS/Gerrit+Code+Review+Plugin) has received new contributions (thanks Alon) and now support many more use-cases:

Integrates with the Gerrit Trigger Plugin for automating Jenkinsfile simple pipelines
Allows posting comments to the source files in Gerrit from a Jenkinsfile pipeline step
Fully compliant with the Declarative and Scripting pipelines
Support multiple review labels in a single review step

The release of v0.3.1 is a significant step to bring this new plugin to a whole new series of use-cases and opening it to future contributions.

Thanks for everyone involved in reviews, fixes, and contributions. Feel free to give it a try and contribute to it.

Luca.

Luca Milanesio

unread,
Nov 5, 2018, 10:47:40 AM11/5/18
to Repo and Gerrit Discussion, 'Björn Pedersen' via Jenkins Users, Luca Milanesio, Yubin Ruan, Gareth Bowles


On 31 Oct 2018, at 13:58, Luca Milanesio <luca.mi...@gmail.com> wrote:



On 31 Oct 2018, at 06:10, Yubin Ruan <ablack...@gmail.com> wrote:

Hi, I fail to use this plugin in our Gerrit+Jenkins system. Can you provide more docs about how it works and how to tune it? Specifically a usable example will be very helpful.

Hi Yubin,
the simplest use-case is really identical to a typical Multi-branch  pipeline project: just put the Gerrit Repository HTTP URL in the field ... and nothing more :-)
Believe me, it just works without configuration.

If you then need to put more integration with Gerrit, please refer to the project README at:

I have published as well last week a YouTube Video of how to use the plugin:

It is the screen recording of my talk 2 weeks ago in Nice for the JenkinsWorld 2018.
Hope it would help to get started using the plugin and provide feedback and contributions.

Luca.


And if you have any issues, just ping the mailing list :-)

Luca.


Thanks,
Yubin

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
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-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Yubin Ruan

unread,
Nov 7, 2018, 12:33:29 AM11/7/18
to Luca Milanesio, repo-d...@googlegroups.com, jenkins...@googlegroups.com, Gareth Bowles
> I have published as well last week a YouTube Video of how to use the plugin:
> https://www.youtube.com/watch?v=pyPMeCW-Q5k
>
> It is the screen recording of my talk 2 weeks ago in Nice for the JenkinsWorld 2018.
> Hope it would help to get started using the plugin and provide feedback and contributions.
>
> Luca.
>
>
> And if you have any issues, just ping the mailing list :-)
>
> Luca.

Many thanks, Luca,

but I got several issues:

1.In the "Multi-branch pipeline" configuration, SSH is not
supported. I can only use HTTP.... Are there any way to fix that?
2. Can you share the web hook plugin for gerrit? (i.e., the
"./add-webhook.sh" in your video record)
3. and, can I post message when a specify stage fail/succeed ?,
i.e., I want to post message to Gerrit inside every single stage, not
after the whole "stages".
4. Can you share your example gerrit configuration file ?

--
Yubin

Luca Milanesio

unread,
Nov 7, 2018, 3:49:27 AM11/7/18
to Yubin Ruan, Luca Milanesio, repo-d...@googlegroups.com, jenkins...@googlegroups.com, Gareth Bowles


> On 7 Nov 2018, at 04:48, Yubin Ruan <ablack...@gmail.com> wrote:
>
>> I have published as well last week a YouTube Video of how to use the plugin:
>> https://www.youtube.com/watch?v=pyPMeCW-Q5k
>>
>> It is the screen recording of my talk 2 weeks ago in Nice for the JenkinsWorld 2018.
>> Hope it would help to get started using the plugin and provide feedback and contributions.
>>
>> Luca.
>>
>>
>> And if you have any issues, just ping the mailing list :-)
>>
>> Luca.
>
> Many thanks, Luca,
>
> but I got several issues:
>
> 1.In the "Multi-branch pipeline" configuration, SSH is not
> supported. I can only use HTTP.... Are there any way to fix that?

Yes, it only supports HTTP/HTTPS at the moment.

Bear in mind that it would need access to the Gerrit REST API anyway, so you would need HTTP/HTTPS connectivity to Gerrit anyway.
So then, why don't just use the HTTP/HTTPS URL to clone?

> 2. Can you share the web hook plugin for gerrit? (i.e., the
> "./add-webhook.sh" in your video record)

See the content of the shell script below:

WEBHOOKS_URL=https://gerrit-ci.gerritforge.com/job/plugin-webhooks-bazel-master/lastSuccessfulBuild/artifact/bazel-genfiles/plugins/webhooks/webhooks.jar
curl $WEBHOOKS_URL > $(dirname $0)/plugins/webhooks.jar

(basically just downloading the plugin from Gerrit CI and putting into the Gerrit's plugins directory, that's it)

> 3. and, can I post message when a specify stage fail/succeed ?,
> i.e., I want to post message to Gerrit inside every single stage, not
> after the whole "stages".

Oh yes, just call the step 'gerritReview' where you need, including a single stage.


> 4. Can you share your example gerrit configuration file ?

I've used the default gerrit.config of a Dev instance, plus the configuration for the refsfilter module and the webhooks default settings.

[gerrit]
basePath = git
serverId = 61e561d7-693d-4ed6-b825-5b30f1dac430
canonicalWebUrl = http://localhost:9090/
installModule = com.gerritforge.gerrit.modules.refsfilter.GuiceModule
[database]
type = h2
database = /Users/lucamilanesio/jw2018/gerrit/db/ReviewDB
[noteDb "changes"]
disableReviewDb = true
primaryStorage = note db
read = true
sequence = true
write = true
[container]
javaOptions = "-Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance"
javaOptions = "-Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance"
user = lucamilanesio
javaHome = /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre
[index]
type = LUCENE
[auth]
type = DEVELOPMENT_BECOME_ANY_ACCOUNT
skipFullRefEvaluationIfAllRefsAreVisible = false
[receive]
enableSignedPush = false
[sendemail]
smtpServer = localhost
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = http://*:9090/
[cache]
directory = cache
[plugin "webhooks"]
connectionTimeout = 3000
socketTimeout = 2500
maxTries = 300
retryInterval = 2000
threadPoolSize = 3
[plugins]
checkFrequency = 10s

>
> --
> Yubin

Reply all
Reply to author
Forward
0 new messages