aboutsummaryrefslogtreecommitdiffstats
path: root/services.py
blob: 67e5fb6ff4160b627ae962d25cb4ed0f587fa26c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#
# SPDX-License-Identifier: GPL-2.0-only
#

from buildbot.plugins import reporters
from yoctoabb import config
import os

services = []

with open(os.path.join(os.path.dirname(__file__), "default_mail.txt"), "r") as f:
    emailtext = "\n".join(f.readlines())

formatter = reporters.MessageFormatter(template=emailtext)

generator = reporters.BuildStatusGenerator(
    mode=('failing', 'warnings', 'exception', 'cancelled'),
    message_formatter=formatter,
    builders=['a-full', 'a-quick', 'buildperf-alma8', 'buildperf-debian11', 'docs'])

#services.append(
#     reporters.MailNotifier(fromaddr="controller@yoctoproject.org",
#                            extraRecipients=["yocto-builds@lists.yoctoproject.org"],
#                            generators=[generator])
#)


# services.append(
#     reporters.IRC(host="irc.freenode.net",
#                   nick="YoctoAutobuilderBot",
#                   password=""
#                   notify_events={
#                     'successToFailure': 1,
#                     'failureToSuccess': 0
#                   },
#                   channels=["yocto"],
#                   noticeOnChannel=True))


# from yoctoabb.reporters import swatbot
# services.append(
#     swatbot.SwatBot("http://localhost:8000/", "buildbot-notifier", "password")
# )