forked from Fediversity/Fediversity
configure debug printing
This commit is contained in:
parent
45c53ec150
commit
2cc96eb530
1 changed files with 3 additions and 1 deletions
|
@ -146,11 +146,13 @@ class DeploymentStatus(ConfigurationForm):
|
||||||
# in local dev, it will just reject the `/tmp` and make it in HOME after all.
|
# in local dev, it will just reject the `/tmp` and make it in HOME after all.
|
||||||
"HOME": "/tmp",
|
"HOME": "/tmp",
|
||||||
"XDG_CACHE_HOME": "/tmp",
|
"XDG_CACHE_HOME": "/tmp",
|
||||||
|
# "TF_LOG": "info",
|
||||||
} | {
|
} | {
|
||||||
# pass in form info to our deployment
|
# pass in form info to our deployment
|
||||||
# FIXME: ensure sensitive info is protected
|
# FIXME: ensure sensitive info is protected
|
||||||
f"TF_VAR_{k}": v if isinstance(v, str) else json.dumps(v) for k, v in (settings.ENV_VARS | deployment_params).items()
|
f"TF_VAR_{k}": v if isinstance(v, str) else json.dumps(v) for k, v in (settings.ENV_VARS | deployment_params).items()
|
||||||
}
|
}
|
||||||
|
logger.info("env: %s", env)
|
||||||
cwd = f"{settings.repo_dir}/launch"
|
cwd = f"{settings.repo_dir}/launch"
|
||||||
cmd = [
|
cmd = [
|
||||||
"tofu",
|
"tofu",
|
||||||
|
@ -161,5 +163,5 @@ class DeploymentStatus(ConfigurationForm):
|
||||||
"-lock=false",
|
"-lock=false",
|
||||||
]
|
]
|
||||||
deployment_result = subprocess.run(cmd, cwd=cwd, env=env)
|
deployment_result = subprocess.run(cmd, cwd=cwd, env=env)
|
||||||
logging.info(deployment_result)
|
logger.debug("deployment_result: %s", deployment_result)
|
||||||
return deployment_result, deployment_params
|
return deployment_result, deployment_params
|
||||||
|
|
Loading…
Add table
Reference in a new issue