On Fri, Aug 18, 2017 at 5:04 AM, Luca Milanesio
<luca.milane...@gmail.com> wrote:
>     gerrit.withServer("http://gerrit:8080/";, "gerrit") {

I would strongly advise you *not* to use the “DSL style”
(`workflow-cps` dependency). Define `Step`s and leave it at that.

>             gerrit.review("Verified", 1, "It works !")

Why do you even need any special steps? IMO it should suffice to have
a generic `Jenkinsfile`, and if the branch source is configured to
post reviews, a successful build would be +1 and an unstable/failed
build -1. This is what, say, `github-branch-source` does with the
GitHub Status API.

(There could be steps added for advanced customization, like adding
one vote per test stage or whatever, but you should be able to
integrate with voting without making any mention of Gerrit in your
`Jenkinsfile`.)

BTW did you implement `SCMNavigator`? I am not a Gerrit user but my
understanding was that it should be possible to query the server for
hosted repositories and set up jobs with `Jenkinsfile`s automatically,
making it that much easier to get started in a big organization.

> A second iteration of the plugin would have a Declarative pipeline
> equivalent as well, which would require even less code required.

See above—if there is nothing mandatory in the `Jenkinsfile`, there is
no need to do anything special for Declarative.

And note that DSL-style integrations will not work in Declarative.
Only plain steps.

> A third iteration of the plugin would support BlueOcean as well, to have a
> fully UX-integrated experience.

I would hope that there is no special BlueOcean integration needed.
You should only need to implement all applicable `scm-api` features,
such as head categories.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0awVVQJn%2BPaJ%3DYV3g1%3DpU%2BgEwOq0kbBQp8x_xf771FfA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to