]> Humopery - private/buildbot-default.git/commitdiff
configure universal email notification, use proper secret configuration
authorErik Mackdanz <erikmack@gmail.com>
Mon, 1 Jul 2024 00:21:51 +0000 (00:21 +0000)
committerErik Mackdanz <erikmack@gmail.com>
Mon, 1 Jul 2024 00:21:51 +0000 (00:21 +0000)
master.cfg

index 208a35bf385f470d542f03443b8d347f054605fc..0ee9ac341f91da0d1575f9b289ba9bacda559de7 100644 (file)
@@ -10,15 +10,17 @@ from buildbot.plugins import *
 # a shorter alias to save typing.
 c = BuildmasterConfig = {}
 
+####### SECRETS
+
+c['secretsProviders'] = [secrets.SecretInAFile(dirname="/var/lib/buildmaster/secrets")]
+
 ####### WORKERS
 
 # The 'workers' list defines the set of recognized workers. Each element is
 # a Worker object, specifying a unique worker name and password.  The same
 # worker name and password must be configured on the worker.
-workerpass = None
-with open("worker-carbon.pass") as f:
-    workerpass = f.readline()
-c['workers'] = [worker.Worker("carbon-worker", workerpass)]
+c['workers'] = [worker.Worker("carbon-worker",
+                              util.Secret("worker-carbon.pass"))]
 
 # 'protocols' contains information about protocols which master will use for
 # communicating with workers. You must define at least 'port' option that workers
@@ -81,6 +83,16 @@ c['builders'].append(
 # has a variety to choose from, like IRC bots.
 
 c['services'] = []
+mn = reporters.MailNotifier(fromaddr="Humopery Buildbot <buildbot@humopery.space>",
+                            relayhost="smtp.humopery.space",
+                            smtpPort=465,
+                            smtpUser="buildbot@humopery.space",
+                            smtpPassword=util.Secret("unix.pass"),
+                            useTls=True,
+                            useSmtps=True,
+                            extraRecipients=["erik@humopery.space","erikmack@gmail.com"])
+c['services'].append(mn)
+
 
 ####### PROJECT IDENTITY