def getBuild(self, product, version, compiletarget, platform, language='en_US', certlevel='Not Tested', subproduct='Application', format='RIBS Installer'): try: codex = CodexService() self.logger.info("Trying to get build information from Codex") builds = codex.getBuilds(product, version, subproduct, compiletarget=compiletarget, platform=platform, language=language, certlevel=certlevel, format=format, status='Available') except Exception, e: self.logger.warn(e) self.logger.info("Restart QMS Due to Error") from Restart import childTask task = childTask('restart') task.run()
parameter[key] = self.parameter[key] return parameter def getBuilds(self, product, version, subproduct, compiletarget, platform, language='en_US', certlevel='Not Tested', format='RIBS Installer'): try: codex = CodexService() self.logger.info("Trying to get build information from Codex") builds = codex.getBuilds(product, version, subproduct, compiletarget=compiletarget, platform=platform, language=language, certlevel=certlevel, format=format, status='Available') except Exception, e: self.logger.warn(e) self.logger.info("Restart QMS Due to Error") from Restart import childTask task = childTask('restart') task.run() return builds #For testing if __name__ == "__main__": ct = childTask("CodexTask") ct.addPara("Product", "Photoshop") ct.addPara("Version", "13.0") ct.addPara("Platform", "win32") ct.addPara("CertLevel", "Build Failed;Not Tested") #ct.addPara("CompileTarget", "None") ct.addPara("Language", "en_US") #ct.addPara("Format", "Installer") ct.addPara("Repository", "\\\\ps-builds\\Builds\\") ct.addPara("FTPRepository", "ftp://ps-bj-fs/Builds/") ct.run()