commit:     56ac2f08767150fd8659b8d9beac7d56d182b233
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 30 18:35:17 2020 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Wed Dec 30 18:35:17 2020 +0000
URL:        
https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=56ac2f08

Add config option project

Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org>

 buildbot_gentoo_ci/config/config.py | 10 ++++++++++
 gentooci.cfg                        |  4 +++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/buildbot_gentoo_ci/config/config.py 
b/buildbot_gentoo_ci/config/config.py
index 3ad8595..7ed59f1 100644
--- a/buildbot_gentoo_ci/config/config.py
+++ b/buildbot_gentoo_ci/config/config.py
@@ -89,6 +89,7 @@ class GentooCiConfig(util.ComparableMixin):
 
     _known_config_keys = set([
         "db_url",
+        "project"
     ])
 
     compare_attrs = list(_known_config_keys)
@@ -113,6 +114,7 @@ class GentooCiConfig(util.ComparableMixin):
         # and defer the rest to sub-functions, for code clarity
         try:
             config.load_db(config_dict)
+            config.load_project(config_dict)
         finally:
             _errors = None
 
@@ -133,3 +135,11 @@ class GentooCiConfig(util.ComparableMixin):
 
     def load_db(self, config_dict):
         self.db = dict(db_url=self.getDbUrlFromConfig(config_dict))
+
+    def load_project(self, config_dict):
+        if  'project' in config_dict:
+            self.project = dict(
+                project=config_dict['project']
+            )
+        else:
+            error("project are not configured")

diff --git a/gentooci.cfg b/gentooci.cfg
index 5036ae9..198f6e4 100644
--- a/gentooci.cfg
+++ b/gentooci.cfg
@@ -8,10 +8,12 @@
 # a shorter alias to save typing.
 c = BuildmasterConfig = {}
 
-####### DB URL
 ####### DB URL
 # This specifies what database buildbot uses to store its state.
 # It's easy to start with sqlite, but it's recommended to switch to a dedicated
 # database, such as PostgreSQL or MySQL, for use in production environments.
 # 
http://docs.buildbot.net/current/manual/configuration/global.html#database-specification
 c['db_url'] = "mysql://buildbot:[email protected]/gentooci?max_idle=300"
+
+# This specifies what project buildbot uses for Gentoo Ci as default
+c['project'] = "gosbsbase"

Reply via email to