customize

This commit is contained in:
AF 2023-08-05 11:19:04 +00:00
parent 79c0838d9c
commit 6c7f961674
2 changed files with 14 additions and 0 deletions

View File

@ -4,6 +4,7 @@
import os
from buildbot.plugins import *
from buildbot.www.oauth2 import OAuth2Auth
# This is a sample buildmaster config file. It must be installed as
# 'master.cfg' in your buildmaster's base directory.
@ -15,6 +16,11 @@ c = BuildmasterConfig = {}
GITEA_SECRET = os.environ.get("GITEA_SECRET")
GITEA_TOKEN = os.environ.get("GITEA_TOKEN")
CLIENT_ID = os.environ.get("GITEA_CLIENT_ID")
assert CLIENT_ID
CLIENT_SECRET = os.environ.get("GITEA_CLIENT_SECRET")
assert CLIENT_SECRET
####### WORKERS
# The 'workers' list defines the set of recognized workers. Each element is
@ -174,6 +180,13 @@ c["www"] = {
"console_view": {},
},
"change_hook_dialects": {},
"auth": OAuth2Auth(
CLIENT_ID,
CLIENT_SECRET,
name="Gitea",
authUri="https://gitea.parrrate.ru/login/oauth/authorize",
tokenUri="https://gitea.parrrate.ru/login/oauth/access_token",
),
}
if GITEA_SECRET:
c["www"]["change_hook_dialects"]["gitea"] = {

View File

@ -4,4 +4,5 @@ RUN bash worker-setup.sh
USER buildbot
WORKDIR /buildbot
COPY buildbot.tac /buildbot/buildbot.tac
RUN rustup component add clippy
CMD ["/usr/bin/dumb-init", "twistd", "--pidfile=", "-ny", "buildbot.tac"]