mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 14:47:38 +01:00
8964a8697a
Signed-off-by: He Weiwei <hweiwei@vmware.com>
19 lines
574 B
Python
19 lines
574 B
Python
import os
|
|
|
|
from g import templates_dir, config_dir
|
|
from .jinja import render_jinja
|
|
from .misc import prepare_dir
|
|
|
|
clair_adapter_template_dir = os.path.join(templates_dir, "clair-adapter")
|
|
|
|
def prepare_clair_adapter(config_dict):
|
|
clair_adapter_config_dir = prepare_dir(config_dir, "clair-adapter")
|
|
|
|
clair_adapter_env_path = os.path.join(clair_adapter_config_dir, "env")
|
|
clair_adapter_env_template = os.path.join(clair_adapter_template_dir, "env.jinja")
|
|
|
|
render_jinja(
|
|
clair_adapter_env_template,
|
|
clair_adapter_env_path,
|
|
**config_dict)
|