mirror of
https://github.com/scummvm/dockerized-bb.git
synced 2026-06-20 05:46:00 +00:00
BUILDBOT: Let configure database connection string
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -17,6 +17,10 @@ import workers, builds, platforms, ui
|
||||
|
||||
c = BuildmasterConfig = {}
|
||||
|
||||
####### STORAGE
|
||||
|
||||
c["db"] = config.db
|
||||
|
||||
####### WORKERS
|
||||
|
||||
## The workers buildbots.
|
||||
|
||||
Reference in New Issue
Block a user