def buildAll(self): rootPath = os.path.join(self.config["stageDir"], "trunk", "qooxdoo") if self.config["svnRevert"]: util.svnRevert(rootPath) if self.config["svnUpdate"]: util.svnUpdate(rootPath) self.log.info("Updated to revision %s" %util.getSvnVersion(rootPath)) self.log.info("Building all configured targets.") for target in self.config["targets"]: self.buildApp(target)
def __getGeneratorResultDict(cls, job, path): result = { "job" : job, "path" : path, "command" : False, "startDate" : util.getTimestamp(), "revision" : util.getSvnVersion(path), "host" : util.getHostName(), "stopDate" : False, "returncode" : False, "stdout" : False, "stderr" : False } return result
def __getGeneratorResultDict(cls, job, path): result = { "job": job, "path": path, "command": False, "startDate": util.getTimestamp(), "revision": util.getSvnVersion(path), "host": util.getHostName(), "stopDate": False, "returncode": False, "stdout": False, "stderr": False } return result
def buildApp(self, target): buildLog = None if "buildLogDir" in self.config: buildLog = self.prepareBuildLog(self.config["buildLogDir"], target) cmd = "%s -w %s %s" % (self.config["batbuild"], self.config["stageDir"], self.config["targets"][target]) buildStatusFile = os.path.join(self.config["stageDir"], "trunk", "qooxdoo", "buildStatus.json") self.buildStatus = self.getBuildStatusFromFile(buildStatusFile) self.buildStatus[target] = { "SVNRevision": util.getSvnVersion(os.path.join(self.config["stageDir"], "trunk")), "BuildError": False, "BuildStarted": time.strftime(Builder.timeFormat), "BuildFinished": False } if "branch" in self.config: self.buildStatus[target]["branch"] = self.config["branch"] if (self.simulate): if buildLog: buildLog.write("Building target %s: %s" % (target, cmd)) buildLog.close() return if (self.config["buildLogLevel"] == "debug" and buildLog): # Start build with full logging util.invokeLog(cmd, buildLog) buildLog.close() return # Start build, only log errors self.buildAppWithErrorLogging(target, cmd, buildLog) self.storeBuildStatus()
def buildApp(self, target): buildLog = None if "buildLogDir" in self.config: buildLog = self.prepareBuildLog(self.config["buildLogDir"], target) cmd = "%s -w %s %s" %(self.config["batbuild"], self.config["stageDir"], self.config["targets"][target]) buildStatusFile = os.path.join(self.config["stageDir"], "trunk", "qooxdoo", "buildStatus.json") self.buildStatus = self.getBuildStatusFromFile(buildStatusFile) self.buildStatus[target] = { "SVNRevision" : util.getSvnVersion(os.path.join(self.config["stageDir"], "trunk")), "BuildError" : False, "BuildStarted" : time.strftime(Builder.timeFormat), "BuildFinished" : False } if "branch" in self.config: self.buildStatus[target]["branch"] = self.config["branch"] if (self.simulate): if buildLog: buildLog.write("Building target %s: %s" %(target, cmd)) buildLog.close() return if (self.config["buildLogLevel"] == "debug" and buildLog): # Start build with full logging util.invokeLog(cmd, buildLog) buildLog.close() return # Start build, only log errors self.buildAppWithErrorLogging(target, cmd, buildLog) self.storeBuildStatus()
return buildStatus def buildAll(self): rootPath = os.path.join(self.config["stageDir"], "trunk", "qooxdoo") if self.config["svnRevert"]: try: util.svnRevert(rootPath) except Exception, e: self.log.error("Error reverting SVN: " + str(e)) if self.config["svnUpdate"]: try: util.svnUpdate(rootPath) self.log.info("Updated to revision %s" %util.getSvnVersion(rootPath)) except Exception, e: self.log.error("Error updating SVN: " + str(e)) self.log.info("Building all configured targets.") for target in self.config["targets"]: self.buildApp(target) @classmethod def testGenerator(cls, config, logger): initialPath = os.getcwd() results = [] for test in config: logger.debug("Changing working dir to " + test["path"]) os.chdir(test["path"])
return buildStatus def buildAll(self): rootPath = os.path.join(self.config["stageDir"], "trunk", "qooxdoo") if self.config["svnRevert"]: try: util.svnRevert(rootPath) except Exception, e: self.log.error("Error reverting SVN: " + str(e)) if self.config["svnUpdate"]: try: util.svnUpdate(rootPath) self.log.info("Updated to revision %s" % util.getSvnVersion(rootPath)) except Exception, e: self.log.error("Error updating SVN: " + str(e)) self.log.info("Building all configured targets.") for target in self.config["targets"]: self.buildApp(target) @classmethod def testGenerator(cls, config, logger): initialPath = os.getcwd() results = [] for test in config: logger.debug("Changing working dir to " + test["path"]) os.chdir(test["path"]) logger.info("Getting list of Generator jobs")