示例#1
0
 def _done(bsid):
     # return a remotely-usable BuildSetStatus object
     bss = BuildSetStatus(bsid, status, db)
     from buildbot.status.client import makeRemote
     r = makeRemote(bss)
     #self.parent.parent.loop_done() # so it will notify builder loop
     return r
示例#2
0
    def perspective_try(
        self,
        branch,
        revision,
        patch,
        repository,
        project,
        builderNames,
        properties={},
    ):
        db = self.scheduler.master.db
        log.msg("user %s requesting build on builders %s" %
                (self.username, builderNames))

        # build the intersection of the request and our configured list
        builderNames = self.scheduler.filterBuilderList(builderNames)
        if not builderNames:
            return

        wfd = defer.waitForDeferred(
            db.sourcestamps.createSourceStamp(branch=branch,
                                              revision=revision,
                                              repository=repository,
                                              project=project,
                                              patch_level=patch[0],
                                              patch_body=patch[1],
                                              patch_subdir=''))
        # note: no way to specify patch subdir - #1769
        yield wfd
        ssid = wfd.getResult()

        reason = "'try' job from user %s" % self.username

        requested_props = Properties()
        requested_props.update(properties, "try build")
        wfd = defer.waitForDeferred(
            self.scheduler.addBuildsetForSourceStamp(
                ssid=ssid,
                reason=reason,
                properties=requested_props,
                builderNames=builderNames))
        yield wfd
        bsid = wfd.getResult()

        # return a remotely-usable BuildSetStatus object
        bss = BuildSetStatus(bsid, self.scheduler.master.status, db)
        from buildbot.status.client import makeRemote
        r = makeRemote(bss)
        yield r  # return value
示例#3
0
 def get_brs(bsid):
     bss = BuildSetStatus(bsid, self.master.master.status,
                          self.master.master.db)
     brs = bss.getBuildRequests()[0]
     return brs
示例#4
0
 def get_brs(bsid):
     bss = BuildSetStatus(bsid, self.master.master.status,
                          self.master.master.db)
     brs = bss.getBuildRequests()[0]
     return brs
示例#5
0
 def subscribe(bsid):
     ireq = IrcBuildRequest(self)
     bss = BuildSetStatus(bsid, self.scheduler.master.status,
                          self.master.db)
     brs = bss.getBuildRequests()[0]
     brs.subscribe(ireq.started)