aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@gentoo.org>2021-01-02 17:03:07 +0100
committerMagnus Granberg <zorry@gentoo.org>2021-01-02 17:03:07 +0100
commit78b01143652300f1eb98df5d17d6dd4edadd789a (patch)
tree0707ca3f3a54ed02627d002908fa94045de1b6ed
parentAdd config option project (diff)
downloadtinderbox-cluster-78b01143.tar.gz
tinderbox-cluster-78b01143.tar.bz2
tinderbox-cluster-78b01143.zip
Add config option project['repository_basedir']
Signed-off-by: Magnus Granberg <zorry@gentoo.org>
-rw-r--r--buildbot_gentoo_ci/config/config.py17
-rw-r--r--gentooci.cfg3
2 files changed, 14 insertions, 6 deletions
diff --git a/buildbot_gentoo_ci/config/config.py b/buildbot_gentoo_ci/config/config.py
index 7ed59f1..e58e67c 100644
--- a/buildbot_gentoo_ci/config/config.py
+++ b/buildbot_gentoo_ci/config/config.py
@@ -15,7 +15,7 @@
# Copyright Buildbot Team Members
# Origins: buildbot.config.py
# Modifyed by Gentoo Authors.
-# Copyright 2020 Gentoo Authors
+# Copyright 2021 Gentoo Authors
import datetime
import inspect
@@ -49,6 +49,7 @@ from buildbot.config import ConfigErrors, error, loadConfigDict
_errors = None
DEFAULT_DB_URL = 'sqlite:///gentoo.sqlite'
+DEFAULT_REPOSITORY_BASEDIR = 'repository'
#Use GentooCiConfig.loadFromDict
@implementer(interfaces.IConfigLoader)
@@ -89,7 +90,8 @@ class GentooCiConfig(util.ComparableMixin):
_known_config_keys = set([
"db_url",
- "project"
+ "project",
+ "repository_basedir"
])
compare_attrs = list(_known_config_keys)
@@ -137,9 +139,12 @@ class GentooCiConfig(util.ComparableMixin):
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']
- )
+ self.project = {}
+ if 'project' in config_dict:
+ self.project['project'] = config_dict['project']
else:
error("project are not configured")
+ if 'repository_basedir' in config_dict:
+ self.project['repository_basedir'] = config_dict['repository_basedir']
+ else:
+ self.project['repository_basedir'] = DEFAULT_REPOSITORY_BASEDIR
diff --git a/gentooci.cfg b/gentooci.cfg
index 198f6e4..ff12a75 100644
--- a/gentooci.cfg
+++ b/gentooci.cfg
@@ -17,3 +17,6 @@ c['db_url'] = "mysql://buildbot:xxxx@192.168.1.x/gentooci?max_idle=300"
# This specifies what project buildbot uses for Gentoo Ci as default
c['project'] = "gosbsbase"
+
+# This specifies what the repository base dir is
+c['repository_basedir'] = "repository"