aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'buildbot_gentoo_ci/steps/logs.py')
-rw-r--r--buildbot_gentoo_ci/steps/logs.py34
1 files changed, 22 insertions, 12 deletions
diff --git a/buildbot_gentoo_ci/steps/logs.py b/buildbot_gentoo_ci/steps/logs.py
index 85017a5..50e3f3f 100644
--- a/buildbot_gentoo_ci/steps/logs.py
+++ b/buildbot_gentoo_ci/steps/logs.py
@@ -42,10 +42,13 @@ def PersOutputOfLogParser(rc, stdout, stderr):
}
for s in v['pattern_info']:
summary_log_dict[int(k)]['pattern_infos'].append({
- 'type' : s['type'],
+ 'search_type' : s['search_type'],
'status' : s['status'],
- 'id' : s['id'],
+ 'line' : s['line'],
'search_pattern' : s['search_pattern'],
+ 'phase' : s['phase'],
+ 'uuid' : s['uuid'],
+ 'description' : s['description'],
})
build_summery_output['summary_log_dict'] = summary_log_dict
#FIXME: Handling of stderr output
@@ -118,14 +121,23 @@ class SetupParserBuildLoger(BuildStep):
@defer.inlineCallbacks
def run(self):
+ self.gentooci = self.master.namedServices['services'].namedServices['gentooci']
self.aftersteps_list = []
log_cpv = self.getProperty('log_build_data')[self.getProperty('log_cpv')]
build_log_file_compressed = log_cpv['full_logname'] + '.xz'
mastersrc_log = yield os.path.join(self.getProperty('logsdir'), build_log_file_compressed)
log_py = 'log_parser.py'
- config_log_py = 'logparser.json'
mastersrc_py = yield os.path.join(self.master.basedir, log_py)
- mastersrc_config = yield os.path.join(self.master.basedir, config_log_py)
+ repository_data = yield self.gentooci.db.repositorys.getRepositoryByUuid(self.getProperty("project_data")['settings_repository_uuid'])
+ # Git clone settings repo
+ self.aftersteps_list.append(steps.GitLab(repourl=repository_data['url'],
+ name = 'RunGit',
+ descriptionDone=repository_data['name'],
+ mode=repository_data['mode'],
+ method=repository_data['method'],
+ submodules=True,
+ alwaysUseLatest=repository_data['alwaysuselatest']
+ ))
# Upload logfile to worker
self.aftersteps_list.append(steps.FileDownload(
mastersrc=mastersrc_log,
@@ -136,11 +148,6 @@ class SetupParserBuildLoger(BuildStep):
mastersrc=mastersrc_py,
workerdest=log_py
))
- # Upload log parser py config
- self.aftersteps_list.append(steps.FileDownload(
- mastersrc=mastersrc_config,
- workerdest=config_log_py
- ))
#Untar the log
shell_commad_list = []
shell_commad_list.append('xz')
@@ -159,8 +166,11 @@ class SetupParserBuildLoger(BuildStep):
command.append(log_cpv['full_logname'])
command.append('-u')
command.append(self.getProperty('project_data')['uuid'])
- command.append('-d')
- command.append(util.Secret("log_parser_database"))
+ command.append('-c')
+ #FIXME: set it by images/flavors
+ command.append('8')
+ #FIXME: debug
+ #command.append('-d')
self.aftersteps_list.append(steps.SetPropertyFromCommand(
name = 'RunBuildLogParser',
haltOnFailure = True,
@@ -211,7 +221,7 @@ class MakeIssue(BuildStep):
for k, v in sorted(self.summary_log_dict.items()):
# get the issue error
for s in v['pattern_infos']:
- if s['type'] == self.error_dict['phase'] and s['status'] == 'error':
+ if s['search_type'] == self.error_dict['phase'] and s['status'] == 'error':
text_issue_list.append(v['text'])
# add the issue error
self.error_dict['cpv'] = self.getProperty('log_cpv')