taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit d9d703fb96d13b121a2f2442161c200535f6e4d1
parent eb831faef4564bc40f56a7536d7511064941bd57
Author: ms <ms@taler.net>
Date:   Fri,  2 Jul 2021 14:45:57 +0200

BB, filter log lines

Diffstat:
Mbuildbot/master.cfg | 21+++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/buildbot/master.cfg b/buildbot/master.cfg @@ -55,6 +55,19 @@ WORKERS = [] # targets. buildbot/reporters/*.py has a variety to choose from, # like IRC bots. + +class MessageFormatterWithStdout(reporters.MessageFormatter): + def buildAdditionalContext(self, master, ctx): + stdout = [] + for step in ctx["build"]["steps"]: + for log in step["logs"]: + all_logs = log["content"]["content"].splitlines() + # Including only what the script printed on stdout. + for line in all_logs: + if re.search("^o", line): + stdout.append(line[1:]) + ctx.update(dict(stdout="\n".join(stdout))) + tipReserveEmails = reporters.MailNotifier( fromaddr="buildbot@taler.net", # to be sent to a dedicate alias sendToInterestedUsers=False, @@ -62,14 +75,10 @@ tipReserveEmails = reporters.MailNotifier( builders=["check-tips-builder"], extraRecipients=["tips@taler.net"], dumpMailsToLog=True, # debug, to remove - messageFormatter=reporters.MessageFormatter( + messageFormatter=reporters.MessageFormatterWithStdout( wantSteps=True, wantLogs=True, - template=""" - {% for step in build['steps'] %} - {% logs = yield master.data.get("logs", step['logid'], "contents") %} - {{ logs }} - {% endfor %}""", # usually one step + template="{{ stdout }}", subject="tips availability on demo") )