## methods to convert event/external info into objects that the ORM layer uses
- def _get_build_information(self):
+ def _get_build_information(self, consolelogfile):
build_info = {}
# Generate an identifier for each new build
build_info['distro_version'] = self.server.runCommand(["getVariable", "DISTRO_VERSION"])[0]
build_info['started_on'] = timezone.now()
build_info['completed_on'] = timezone.now()
- build_info['cooker_log_path'] = self.server.runCommand(["getVariable", "BB_CONSOLELOG"])[0]
+ build_info['cooker_log_path'] = consolelogfile
build_info['build_name'] = self.server.runCommand(["getVariable", "BUILDNAME"])[0]
build_info['bitbake_version'] = self.server.runCommand(["getVariable", "BB_VERSION"])[0]
logger.warn("buildinfohelper: cannot identify layer exception:%s ", nee)
- def store_started_build(self, event):
+ def store_started_build(self, event, consolelogfile):
assert '_pkgs' in vars(event)
- build_information = self._get_build_information()
+ build_information = self._get_build_information(consolelogfile)
build_obj = self.orm_wrapper.create_build_object(build_information, self.brbe, self.project)
# the code will look into the protected variables of the event; no easy way around this
if isinstance(event, bb.event.BuildStarted):
- buildinfohelper.store_started_build(event)
+ buildinfohelper.store_started_build(event, consolelogfile)
if isinstance(event, (bb.build.TaskStarted, bb.build.TaskSucceeded, bb.build.TaskFailedSilent)):
buildinfohelper.update_and_store_task(event)