From e1325557c827e9ec92319cb72913060e9d019495 Mon Sep 17 00:00:00 2001 From: Ryabin Sergey Date: Thu, 15 Feb 2024 13:17:57 +0100 Subject: [PATCH] add processing --- lib/jsonnet/processing/dockerfile.jsonnet | 11 +++++++++++ lib/jsonnet/processing/makefile.jsonnet | 12 ++++++++++++ lib/jsonnet/processing/processing.jsonnet | 11 +++++++++++ lib/jsonnet/processing/requirements.jsonnet | 11 +++++++++++ 4 files changed, 45 insertions(+) create mode 100644 lib/jsonnet/processing/dockerfile.jsonnet create mode 100644 lib/jsonnet/processing/makefile.jsonnet create mode 100644 lib/jsonnet/processing/processing.jsonnet create mode 100644 lib/jsonnet/processing/requirements.jsonnet diff --git a/lib/jsonnet/processing/dockerfile.jsonnet b/lib/jsonnet/processing/dockerfile.jsonnet new file mode 100644 index 0000000..5e992ea --- /dev/null +++ b/lib/jsonnet/processing/dockerfile.jsonnet @@ -0,0 +1,11 @@ +local kap = import "lib/kapitan.libjsonnet"; +local inventory = kap.inventory(); +local p = inventory.parameters; + + +{ + [processing_name + "/Dockerfile"]: kap.jinja2_template("templates/neomodel/Dockerfile", { + inventory: inventory, + processing: p.mindwm2[processing_name] + }) for processing_name in std.objectFields(p.mindwm2) +} diff --git a/lib/jsonnet/processing/makefile.jsonnet b/lib/jsonnet/processing/makefile.jsonnet new file mode 100644 index 0000000..fc3d76b --- /dev/null +++ b/lib/jsonnet/processing/makefile.jsonnet @@ -0,0 +1,12 @@ +local kap = import "lib/kapitan.libjsonnet"; +local inventory = kap.inventory(); +local p = inventory.parameters; + + +{ + [processing_name + "/Makefile"]: kap.jinja2_template("templates/neomodel/Makefile", { + inventory: inventory, + processing: p.mindwm2[processing_name], + processing_name: processing_name + }) for processing_name in std.objectFields(p.mindwm2) +} diff --git a/lib/jsonnet/processing/processing.jsonnet b/lib/jsonnet/processing/processing.jsonnet new file mode 100644 index 0000000..219d393 --- /dev/null +++ b/lib/jsonnet/processing/processing.jsonnet @@ -0,0 +1,11 @@ +local kap = import "lib/kapitan.libjsonnet"; +local inventory = kap.inventory(); +local p = inventory.parameters; + + +{ + [processing_name + "/processing.py"]: kap.jinja2_template("templates/neomodel/processing.py", { + inventory: inventory, + processing: p.mindwm2[processing_name] + }) for processing_name in std.objectFields(p.mindwm2) +} diff --git a/lib/jsonnet/processing/requirements.jsonnet b/lib/jsonnet/processing/requirements.jsonnet new file mode 100644 index 0000000..5d22432 --- /dev/null +++ b/lib/jsonnet/processing/requirements.jsonnet @@ -0,0 +1,11 @@ +local kap = import "lib/kapitan.libjsonnet"; +local inventory = kap.inventory(); +local p = inventory.parameters; + + +{ + [processing_name + "/requirements.txt"]: kap.jinja2_template("templates/neomodel/requirements.txt", { + inventory: inventory, + processing: p.mindwm2[processing_name] + }) for processing_name in std.objectFields(p.mindwm2) +}