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()
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)