Allow customizing build environment variables

This commit is contained in:
Stéphane Bidoul 2021-11-05 18:23:02 +01:00
parent e1a2a4d5c4
commit 968f94c1e7
No known key found for this signature in database
GPG key ID: BCAB2555446B5B92
5 changed files with 8 additions and 0 deletions

View file

@ -8,5 +8,6 @@ RUNBOAT_BUILD_PGUSER=runboat-build
RUNBOAT_BUILD_PGPASSWORD=...
RUNBOAT_BUILD_ADMIN_PASSWD=...
RUNBOAT_BUILD_DOMAIN=runboat.odoo-community.org
RUNBOAT_BUILD_ENV={}
RUNBOAT_GITHUB_TOKEN=
RUNBOAT_LOG_CONFIG=log-config.yaml

View file

@ -147,6 +147,7 @@ More:
- create builds for all supported repos on startup (goes with sticky branches)
- never undeploy last build of sticky branches
- make build images configurable (see `build_images.py`)
- configurable kubefiles directory
## Author and contributors

View file

@ -141,6 +141,7 @@ class DeploymentVars(BaseModel):
pgdatabase: str
admin_passwd: str
hostname: str
build_env: dict[str, str]
def make_deployment_vars(
@ -171,6 +172,7 @@ def make_deployment_vars(
pgdatabase=build_name,
admin_passwd=settings.build_admin_passwd,
hostname=f"{slug}.{settings.build_domain}",
build_env=settings.build_env or {},
)

View file

@ -44,6 +44,9 @@ configMapGenerator:
- ADDONS_DIR=/build
- RUNBOAT_GIT_REPO=https://github.com/{{ repo }}
- RUNBOAT_GIT_REF={{ git_commit }}
{%- for key, value in build_env.items() %}
- {{ key }}={{ value }}
{%- endfor %}
- name: runboat-scripts
files:
- runboat-clone-and-install.sh

View file

@ -17,6 +17,7 @@ class Settings(BaseSettings):
build_pgpassword: str
build_admin_passwd: str
build_domain: str
build_env: Optional[dict[str, str]]
github_token: Optional[str]
log_config: Optional[str]