Implement authentication via Gitea
Some checks failed
/ checks (pull_request) Failing after 14s

This commit is contained in:
Bart van der Braak 2024-11-20 23:59:35 +01:00
parent 0f45b38432
commit edb56e96dc
22 changed files with 134 additions and 82 deletions

View file

@ -5,8 +5,8 @@
import importlib
def _get_config(ENVIRONMENT: str):
if ENVIRONMENT == "LOCAL":
def _get_config(environment: str):
if environment == "LOCAL":
import conf.local.machines
importlib.reload(conf.local.machines)
@ -18,13 +18,13 @@ def _get_config(ENVIRONMENT: str):
return conf.production.machines
def fetch_platform_worker_names(ENVIRONMENT: str):
machines_config = _get_config(ENVIRONMENT)
return machines_config.get_worker_names(ENVIRONMENT)
def fetch_platform_worker_names(environment: str):
machines_config = _get_config(environment)
return machines_config.get_worker_names(environment)
def get_worker_password(ENVIRONMENT: str, worker_name: str) -> str:
machines_config = _get_config(ENVIRONMENT)
def get_worker_password(environment: str, worker_name: str) -> str:
machines_config = _get_config(environment)
return machines_config.get_worker_password(worker_name)