Next: , Previous: HttpStatusPush, Up: Status Targets


4.13.7 GerritStatusPush

     from buildbot.status.status_gerrit import GerritStatusPush
     
     def gerritReviewCB(builderName, build, result, arg):
         message =  "Buildbot finished compiling your patchset\n"
         message += "on configuration: %s\n" % builderName
         message += "The result is: %s\n" % Results[result].upper()
     
         if arg:
             message += "\nFor more details visit:\n"
             message += "%sbuilders/%s/builds/%d\n" % (arg, builderName, build.getNumber())
     
         # message, verified, reviewed
         return message, (result == 0 or -1), 0
     
     c['buildbotURL'] = 'http://buildbot.example.com/'
     c['status'].append(GerritStatusPush('127.0.0.1', 'buildbot',
                                         reviewCB=gerritReviewCB,
                                         reviewArg=c['buildbotURL']))

GerritStatusPush sends review of the Change back to the Gerrit server.