Hi Luca, I took a look into these suggestions. It seems like I'll need to get back to you after asking for assistance from my work colleagues.
1. I switched to the https URL and got authentication failures in the Jenkins interface. I'm assuming that credentials weren't enabled for https, so I raised a query with our IT department. 2. We don't seem to have a Gerrit SCM source configured. Git is the only option available in that dropdown. I'll need to ask around on that one again and see what I can find out. 3. I attempted to switch the Trigger to Default. However, the build stopped working as the SCM pipeline didn't know which patch to download. I will have to look into this more after the first two issues are resolved. Thanks for the pointers. I will spend some time chasing these up. Best Regards, John Shield On Wednesday, May 27, 2020 at 9:11:57 AM UTC+9:30, Luca Milanesio wrote: > > > > On 27 May 2020, at 00:34, John Shield <john....@gmail.com <javascript:>> > wrote: > > Thanks Luca, > > I had a look at the SCM credentials we're using for the pipeline and the > "Repository URL" in the SCM. As far as I can tell it is setup correctly. > The URL is the one for the authenticated access, and the credentials > provided are being used by the SCM checkout. > > The plugin still seems to think there are no credentials. > > > A few things: > > 1. The Gerrit Code Review plugin supports only Git/HTTP URLs at the moment > 2. You should select “Gerrit” as SCM source (you have a “Git” SCM source > at the moment) > 3. Do not use any Gerrit Trigger strategy, as this plugin doesn’t use > Gerrit stream events. > > HTH > > Luca. > > > I've included a screenshot of the SCM definition. > > <SCM Settings.png> > > It would be great to finally get the Gerrit Code Review plugin working, as > we want to separate regression builds into a separate tag. To be honest, > we've been ignoring the problem for 6 months as we've focusing on the > project work instead. > > Best Regards, > > John Shield > > On Wednesday, May 27, 2020 at 7:30:41 AM UTC+9:30, Luca Milanesio wrote: >> >> >> >> On 26 May 2020, at 17:10, John Shield <john....@gmail.com> wrote: >> >> Dear All, >> >> Looking for some help understanding how to assign credentials for the Gerrit >> Code Review Plugin to work. >> >> Aside from that specific plugin, we're able to build and get verification >> tags just fine. The git successfully checks out from gerrit using the >> credentials defined for the checkout SCM in a declarative pipeline, and >> Jenkins successfully posts the normal build verification. >> >> When attempting to use commands from Gerrit Code Review Plugin >> "gerritComment" or "gerritReview labels", we get the following error message. >> "Gerrit Review requires authentication, however there are no credentials >> defined or are empty." >> >> It's unclear for me how the Gerrit Code Review Plugin accepts credentials. >> >> >> You need to define the SCM credentials in the Gerrit SCM source of the >> pipeline, otherwise Jenkins won’t know what’s the credentials-id to use. >> >> Please note that Gerrit repos have two URLs: one anonymous and one for >> authenticated access (prefixed by ‘/a/‘). You need to use the authenticated >> one for being able to post reviews. >> >> I haven't been able to find out any documentation about a special >> credentials id variable, or example for the plugin needing declaration of >> credentials. >> >> I would be grateful for any help in understanding this problem. >> >> >> Let me know if the above guidance is enough. >> >> HTH >> >> Luca. >> >> >> Best Regards, >> >> John Shield >> >> >> -- >> 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 jenkins...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-users/56812aa6-41f6-4434-837e-7ff54a4a276f%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-users/56812aa6-41f6-4434-837e-7ff54a4a276f%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 jenkins...@googlegroups.com <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/994bd305-6a04-4c1b-bc53-9ac9bc234b7f%40googlegroups.com > > <https://groups.google.com/d/msgid/jenkinsci-users/994bd305-6a04-4c1b-bc53-9ac9bc234b7f%40googlegroups.com?utm_medium=email&utm_source=footer> > . > <SCM Settings.png> > > > -- 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/33612c02-5b02-41e1-a835-21dcd5817a1e%40googlegroups.com.