示例#1
0
文件: build.py 项目: hustcsxg/UPL4CY
    def promote(self, name):
        """force promotion by name."""
        if self.is_running:
            raise exception.NotStopYet("%s is still running." % self.name)

        url = "%s/promotion/forcePromotion?name=%s" % (self.url, name)
        try:
            self.get_jenkins_obj().requester.post_and_confirm_status(url, data='')
        except exception.RequestError:
            raise exception.UnknownPromotion(name)

        # update info
        self.poll()
示例#2
0
文件: build.py 项目: zmoon111/CUP
    def ftp_artifacts(self):
        """get ftp artifacts object of build."""
        if self.is_running:
            raise exception.NotStopYet("%s is still running." % self.name)

        return self.get_jenkins_obj().FTPArtifacts(self)