response = oestats_send(server, "/builds/%s/" % id, {
'status': status,
})
+ if status == 'Failed':
+ bb.note("oestats: build failed, see http://%s%s" % (server,response))
except:
bb.note("oestats: error stopping build")
def oestats_task(server, d, task, status):
import bb
import glob
+ import os.path
import time
# retrieve build id
logs = glob.glob("%s/log.%s.*" % (bb.data.getVar('T', d, True), task))
if len(logs) > 0:
log = logs[0]
- bb.note("oestats: sending log file : %s" % log)
files['log'] = {
'filename': 'log.txt',
'content': file(log).read(),
'content-type': 'text/plain'}
+ if task == 'do_package':
+ qalog = "%s/log.qa_package" % bb.data.getVar('T', d, True)
+ if os.path.exists(qalog):
+ files['qalog'] = {
+ 'filename': 'qalog.txt',
+ 'content': file(qalog).read(),
+ 'content-type': 'text/plain'}
# prepare report
vars = {
# send report
try:
response = oestats_send(server, "/tasks/", vars, files)
+ if status == 'Failed':
+ bb.note("oestats: task failed, see http://%s%s" % (server, response))
except:
bb.note("oestats: error sending task, disabling stats")
oestats_setid(d, "")