Gentoo Archives: gentoo-commits

From: Magnus Granberg <zorry@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/tinderbox-cluster:master commit in: /, buildbot_gentoo_ci/config/
Date: Wed, 30 Dec 2020 18:35:29
Message-Id: 1609353317.56ac2f08767150fd8659b8d9beac7d56d182b233.zorry@gentoo
1 commit: 56ac2f08767150fd8659b8d9beac7d56d182b233
2 Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 30 18:35:17 2020 +0000
4 Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 30 18:35:17 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=56ac2f08
7
8 Add config option project
9
10 Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org>
11
12 buildbot_gentoo_ci/config/config.py | 10 ++++++++++
13 gentooci.cfg | 4 +++-
14 2 files changed, 13 insertions(+), 1 deletion(-)
15
16 diff --git a/buildbot_gentoo_ci/config/config.py b/buildbot_gentoo_ci/config/config.py
17 index 3ad8595..7ed59f1 100644
18 --- a/buildbot_gentoo_ci/config/config.py
19 +++ b/buildbot_gentoo_ci/config/config.py
20 @@ -89,6 +89,7 @@ class GentooCiConfig(util.ComparableMixin):
21
22 _known_config_keys = set([
23 "db_url",
24 + "project"
25 ])
26
27 compare_attrs = list(_known_config_keys)
28 @@ -113,6 +114,7 @@ class GentooCiConfig(util.ComparableMixin):
29 # and defer the rest to sub-functions, for code clarity
30 try:
31 config.load_db(config_dict)
32 + config.load_project(config_dict)
33 finally:
34 _errors = None
35
36 @@ -133,3 +135,11 @@ class GentooCiConfig(util.ComparableMixin):
37
38 def load_db(self, config_dict):
39 self.db = dict(db_url=self.getDbUrlFromConfig(config_dict))
40 +
41 + def load_project(self, config_dict):
42 + if 'project' in config_dict:
43 + self.project = dict(
44 + project=config_dict['project']
45 + )
46 + else:
47 + error("project are not configured")
48
49 diff --git a/gentooci.cfg b/gentooci.cfg
50 index 5036ae9..198f6e4 100644
51 --- a/gentooci.cfg
52 +++ b/gentooci.cfg
53 @@ -8,10 +8,12 @@
54 # a shorter alias to save typing.
55 c = BuildmasterConfig = {}
56
57 -####### DB URL
58 ####### DB URL
59 # This specifies what database buildbot uses to store its state.
60 # It's easy to start with sqlite, but it's recommended to switch to a dedicated
61 # database, such as PostgreSQL or MySQL, for use in production environments.
62 # http://docs.buildbot.net/current/manual/configuration/global.html#database-specification
63 c['db_url'] = "mysql://buildbot:xxxx@192.168.1.x/gentooci?max_idle=300"
64 +
65 +# This specifies what project buildbot uses for Gentoo Ci as default
66 +c['project'] = "gosbsbase"