[Gluster-infra] Re-enabled bug-checks and smoke test voting in Jenkins

Niels de Vos ndevos at redhat.com
Sat May 16 08:17:05 UTC 2015

Since the Gerrit upgrade a couple of weeks ago, Jenkins failed to report
the status of several tests to Gerrit. I just had a look at this, and
what the difference between the failing tests and the working ones are.
It seems that the regression tests include an ssh-command to do the
voting, instead of relying on the configuration options that the Jenkins
interface offers.

After a few tests, I can confirm that our version of Jenkins does not
like to talk to Gerrit, or thr other way around. At least the
configuration in Jenkins is not suffiecient anymore. The interesting bit
is, that Jenkins does get the triggers from Gerrit and starts to run the
tests. Only the results of the tests are not posted...

A workaround for this issue can be inserted in the build/test scripts
that Jenkins has in its webui. The voting in the Jenkins webui needs to
be disabled, in the webui of a job:


 - Add the following snippet at the top of the Build/Execute shell

    # Workaround needed because Jenkins config fails :-/
    # Update Gerrit with the success/failure status.
    # Existing Verified votes should only be overwritten on failure.
        local RETVAL="$?"
        local VERDICT='FAILED'
        local VERIFIED='--verified=-1'
        if [ "${RETVAL}" == '0' ]; then
        ssh build at review.gluster.org \
            gerrit review \
                --message "'${BUILD_URL} : ${VERDICT}'" \
                --project=glusterfs \
                ${VERIFIED} \
                --code-review=0 $GIT_COMMIT
    trap gerrit_vote EXIT

 - Gerrit Trigger
   - Gerrit Reporting Values
     - Skip Vote: [x] Successful [x] Failed [x] Unstable [x] Not built

 - Post-build Actions (last part of the page)
   - Gerrit Integration: [Delete]

 - [Save] at the bottom of the page

I have added the above snippet to the smoke and bug-check jobs, and will
have a look at adding it to other jobs too.


More information about the Gluster-infra mailing list