mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-25 01:58:35 +01:00
ab7c81dac6
Remove some code related to adminserver Fix some issues by adminserver removeing Signed-off-by: Qian Deng <dengq@vmware.com>
11 lines
398 B
Python
11 lines
398 B
Python
from jinja2 import Environment, FileSystemLoader
|
|
from .misc import mark_file
|
|
|
|
jinja_env = Environment(loader=FileSystemLoader('/'), trim_blocks=True)
|
|
|
|
def render_jinja(src, dest,mode=0o640, uid=0, gid=0, **kw):
|
|
t = jinja_env.get_template(src)
|
|
with open(dest, 'w') as f:
|
|
f.write(t.render(**kw))
|
|
mark_file(dest, mode, uid, gid)
|
|
print("Generated configuration file: %s" % dest) |