Dear all,

We are currently in the process of setting up a Jenkins server to listen 
and respond to events on our Gerrit code review system. As such, we are 
using the "Gerrit-Trigger" plugin. A small problem is that those running 
our Gerrit server will not give us SSH access. We therefore have to rely 
solely on Gerrit's REST API. We have a HTTP username and password setup 
which we have verified is correct and has adequate permissions.

When adding the Gerrit server to the Gerrit-Trigger server list we add the 
frontend URL and, in the advanced section, select "Use REST API"  then 
enter our Gerrit HTTP Username and Password. Upon clicking "Test REST 
Connect" we receive the "Success" message. I have confirmed that we receive 
an error message when entering the wrong username and password, so I assume 
the Gerrit-Trigger plugin is able to make some kind of connection. When 
saving and leaving the configuration page we try to start the 
Gerrit-Trigger server by pressing the red button on the Gerrit-Trigger 
dashboard. The button blinks for a few seconds then stops. Looking into the 
Jenkins log, the following is given:

`2020-08-14 04:26:35.693+0000 [id=37] INFO c.s.h.p.g.t.
GerritProjectListUpdater#tryLoadProjectList: Not connected to gem5-review, 
waiting for 64 second(s)`

The only theory we have right now is that perhaps the Gerrit-Trigger plugin 
requires SSH access as a prerequisite. We can't find this explicitly noted 
anywhere, and we don't know why this would be the case given the plugin has 
the access it requires via the REST API. If this is the case, it'd be nice 
if someone could verify this for us. If not, we would appreciate some help 
with this issue.

Attached is our gerrit-trigger.xml configuration file (passwords redacted).

Jenkins Version: 2.235.2
Gerrit Trigger Version: 2.30.5
Gerrit Code Review Version: 3.2.3-1238-g443f7314cb

Thank you very much for your time.

Kind regards,
Bobby


-- 
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/a6094a7f-062a-41b0-9a06-5365990a7293n%40googlegroups.com.
<?xml version='1.1' encoding='UTF-8'?>
<com.sonyericsson.hudson.plugins.gerrit.trigger.PluginImpl plugin="gerrit-trigger@2.30.5">
  <servers class="java.util.concurrent.CopyOnWriteArrayList">
    <com.sonyericsson.hudson.plugins.gerrit.trigger.GerritServer>
      <name>gem5-review</name>
      <noConnectionOnStartup>true</noConnectionOnStartup>
      <config class="com.sonyericsson.hudson.plugins.gerrit.trigger.config.Config">
        <gerritHostName>gem5-review</gerritHostName>
        <gerritSshPort>29418</gerritSshPort>
        <gerritProxy></gerritProxy>
        <gerritUserName></gerritUserName>
        <gerritEMail></gerritEMail>
        <gerritAuthKeyFile>/var/lib/jenkins/.ssh/id_rsa</gerritAuthKeyFile>
        <gerritAuthKeyFilePassword>[REDACTED]</gerritAuthKeyFilePassword>
        <useRestApi>true</useRestApi>
        <gerritHttpUserName>git-bbruce.ucdavis.edu</gerritHttpUserName>
        <gerritHttpPassword>[REDACTED]</gerritHttpPassword>
        <restCodeReview>true</restCodeReview>
        <restVerified>false</restVerified>
        <gerritVerifiedCmdBuildSuccessful>gerrit review &lt;CHANGE&gt;,&lt;PATCHSET&gt; --message &apos;Build Successful &lt;BUILDS_STATS&gt;&apos; --verified &lt;VERIFIED&gt; --code-review &lt;CODE_REVIEW&gt; --tag autogenerated:jenkins-gerrit-trigger</gerritVerifiedCmdBuildSuccessful>
        <gerritVerifiedCmdBuildUnstable>gerrit review &lt;CHANGE&gt;,&lt;PATCHSET&gt; --message &apos;Build Unstable &lt;BUILDS_STATS&gt;&apos; --verified &lt;VERIFIED&gt; --code-review &lt;CODE_REVIEW&gt; --tag autogenerated:jenkins-gerrit-trigger</gerritVerifiedCmdBuildUnstable>
        <gerritVerifiedCmdBuildFailed>gerrit review &lt;CHANGE&gt;,&lt;PATCHSET&gt; --message &apos;Build Failed &lt;BUILDS_STATS&gt;&apos; --verified &lt;VERIFIED&gt; --code-review &lt;CODE_REVIEW&gt; --tag autogenerated:jenkins-gerrit-trigger</gerritVerifiedCmdBuildFailed>
        <gerritVerifiedCmdBuildStarted>gerrit review &lt;CHANGE&gt;,&lt;PATCHSET&gt; --message &apos;Build Started &lt;BUILDURL&gt; &lt;STARTED_STATS&gt;&apos; --verified &lt;VERIFIED&gt; --code-review &lt;CODE_REVIEW&gt; --tag autogenerated:jenkins-gerrit-trigger</gerritVerifiedCmdBuildStarted>
        <gerritVerifiedCmdBuildNotBuilt>gerrit review &lt;CHANGE&gt;,&lt;PATCHSET&gt; --message &apos;No Builds Executed &lt;BUILDS_STATS&gt;&apos; --verified &lt;VERIFIED&gt; --code-review &lt;CODE_REVIEW&gt; --tag autogenerated:jenkins-gerrit-trigger</gerritVerifiedCmdBuildNotBuilt>
        <gerritFrontEndUrl>https://gem5-review.googlesource.com/</gerritFrontEndUrl>
        <gerritBuildStartedVerifiedValue>0</gerritBuildStartedVerifiedValue>
        <gerritBuildSuccessfulVerifiedValue>1</gerritBuildSuccessfulVerifiedValue>
        <gerritBuildFailedVerifiedValue>-1</gerritBuildFailedVerifiedValue>
        <gerritBuildUnstableVerifiedValue>0</gerritBuildUnstableVerifiedValue>
        <gerritBuildNotBuiltVerifiedValue>0</gerritBuildNotBuiltVerifiedValue>
        <gerritBuildStartedCodeReviewValue>0</gerritBuildStartedCodeReviewValue>
        <gerritBuildSuccessfulCodeReviewValue>0</gerritBuildSuccessfulCodeReviewValue>
        <gerritBuildFailedCodeReviewValue>0</gerritBuildFailedCodeReviewValue>
        <gerritBuildUnstableCodeReviewValue>-1</gerritBuildUnstableCodeReviewValue>
        <gerritBuildNotBuiltCodeReviewValue>0</gerritBuildNotBuiltCodeReviewValue>
        <enableManualTrigger>true</enableManualTrigger>
        <enablePluginMessages>true</enablePluginMessages>
        <triggerOnAllComments>false</triggerOnAllComments>
        <buildScheduleDelay>3</buildScheduleDelay>
        <dynamicConfigRefreshInterval>30</dynamicConfigRefreshInterval>
        <enableProjectAutoCompletion>true</enableProjectAutoCompletion>
        <projectListRefreshInterval>3600</projectListRefreshInterval>
        <projectListFetchDelay>0</projectListFetchDelay>
        <categories class="linked-list">
          <com.sonyericsson.hudson.plugins.gerrit.trigger.VerdictCategory>
            <verdictValue>Code-Review</verdictValue>
            <verdictDescription>Code Review</verdictDescription>
          </com.sonyericsson.hudson.plugins.gerrit.trigger.VerdictCategory>
          <com.sonyericsson.hudson.plugins.gerrit.trigger.VerdictCategory>
            <verdictValue>Verified</verdictValue>
            <verdictDescription>Verified</verdictDescription>
          </com.sonyericsson.hudson.plugins.gerrit.trigger.VerdictCategory>
        </categories>
        <replicationConfig>
          <enableReplication>false</enableReplication>
          <slaves class="linked-list"/>
          <enableSlaveSelectionInJobs>false</enableSlaveSelectionInJobs>
        </replicationConfig>
        <watchdogTimeoutMinutes>0</watchdogTimeoutMinutes>
        <watchTimeExceptionData>
          <daysOfWeek/>
          <timesOfDay class="linked-list"/>
        </watchTimeExceptionData>
        <notificationLevel>ALL</notificationLevel>
        <buildCurrentPatchesOnly>
          <enabled>false</enabled>
          <abortNewPatchsets>false</abortNewPatchsets>
          <abortManualPatchsets>false</abortManualPatchsets>
          <abortSameTopic>false</abortSameTopic>
        </buildCurrentPatchesOnly>
      </config>
    </com.sonyericsson.hudson.plugins.gerrit.trigger.GerritServer>
  </servers>
  <pluginConfig>
    <numberOfReceivingWorkerThreads>3</numberOfReceivingWorkerThreads>
    <numberOfSendingWorkerThreads>1</numberOfSendingWorkerThreads>
    <replicationCacheExpirationInMinutes>360</replicationCacheExpirationInMinutes>
  </pluginConfig>
</com.sonyericsson.hudson.plugins.gerrit.trigger.PluginImpl>

Reply via email to