예제 #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)