BUILDBOT: Let configure database connection string

This commit is contained in:
Le Philousophe
2020-04-19 07:47:28 +00:00
parent 5bf79ccd75
commit 653f416ea7
4 changed files with 15 additions and 1 deletions
+6 -1
View File
@@ -58,8 +58,13 @@ $(BUILDDIR)/buildbot_installed: Makefile | $(BUILDDIR)
touch $(BUILDDIR)/buildbot_installed
# Create startup file once buildbot is installed and up-to-date
# Database setting is loaded from master/config.py
# create-master with initialize the database if it doesn't exist yet
# upgrade-master will upgrade it if it needs to be
master/buildbot.tac: $(BUILDDIR)/buildbot_installed
buildbot create-master -rf master
DBLINE=$$(cd master && python3 -c 'import config; config.init("."); print(config.db["db_url"])') && \
buildbot create-master -rf --db=$${DBLINE} master
buildbot upgrade-master master
rm master/master.cfg.sample
touch master/buildbot.tac
+1
View File
@@ -27,6 +27,7 @@ To setup the whole thing:
- `. buildbot-master/bin/activate`
- `git clone repo`
- `cd dockerized-bb`
- `cp master/config.py.example master/config.py` and edit config.py to fit your needs
- `make master`
- `make workers`
- `cp contrib/buildbot.service /etc/systemd/system/buildbot.service` and adapt paths and user
+4
View File
@@ -5,6 +5,10 @@ def init(base_dir):
buildbot_base_dir = os.path.expanduser(base_dir)
buildbot_data_dir = os.path.normpath(os.path.join(buildbot_base_dir, "..", "buildbot-data"))
db = {
"db_url": "sqlite:///state.sqlite"
}
docker_socket = 'unix:///var/run/docker.sock'
docker_workers_net = 'workers-net'
+4
View File
@@ -17,6 +17,10 @@ import workers, builds, platforms, ui
c = BuildmasterConfig = {}
####### STORAGE
c["db"] = config.db
####### WORKERS
## The workers buildbots.