summaryrefslogtreecommitdiffstats
path: root/.gitlab-ci/generate_lava.py
blob: ab1597f1fe3aa88c92abdb424bb13e08bc5583e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python3

from jinja2 import Environment, FileSystemLoader
import argparse

parser = argparse.ArgumentParser()
parser.add_argument("--template")
parser.add_argument("--base-artifacts-url")
parser.add_argument("--arch")
parser.add_argument("--device-type")
parser.add_argument("--kernel-image-name")
parser.add_argument("--gpu-version")
args = parser.parse_args()

env = Environment(loader = FileSystemLoader('.'), trim_blocks=True, lstrip_blocks=True)
template = env.get_template(args.template)

values = {}
values['base_artifacts_url'] = args.base_artifacts_url
values['arch'] = args.arch
values['device_type'] = args.device_type
values['kernel_image_name'] = args.kernel_image_name
values['gpu_version'] = args.gpu_version

print(template.render(values))