aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2020-07-16 09:25:56 +0200
committerCorentin LABBE <clabbe@baylibre.com>2020-07-16 09:25:56 +0200
commit5cbbce37ba330f9617d27b561cb260a104d3dcb1 (patch)
tree55c2179e776a431897d2179e0b6efed2b27157f6
parentb5bcfa146da2baf76fd466a7130a08465e9331ba (diff)
SPEC-3414: add new metadata for kernelCI
Recent kernelCI expects to have more metadata in LAVA job definition. This patchs add them. Change-Id: I936947ee2ea799c28220f25a587392b7d94d488e Bug-AGL: SPEC-3414 Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
-rw-r--r--templates/base/agl-metadata.jinja220
-rw-r--r--utils/agljobtemplate.py5
2 files changed, 25 insertions, 0 deletions
diff --git a/templates/base/agl-metadata.jinja2 b/templates/base/agl-metadata.jinja2
index 1cade7f..e3345e2 100644
--- a/templates/base/agl-metadata.jinja2
+++ b/templates/base/agl-metadata.jinja2
@@ -8,10 +8,30 @@ metadata:
kernel.version: {{ kernel_version }}
kernel.defconfig_base: {{ kernel_defconfig_base }}
kernel.defconfig: {{ kernel_defconfig }}
+ kernel.endian: {{ kernel_endian }}
platform.mach: {{ device_mach }}
platform.name: {{ device_type }}
+{%- if dtb %}
+ platform.dtb: {{ dtb }}
+{%- else %}
+ platform.dtb: None
+{%- endif %}
git.url: {{ vcs_url }}
+ git.describe: {{ vcs_branch }}
test.plan: {{ test_plan }}
+ test.plan_variant: {{ test_plan }}
device.type: {{ device_type }}
job.build_environment: {{ kernel_tree }}
+ job.file_server_resource: {{ resource_path }}
+ job.kernel_image: {{ kernel_image }}
+{%- if dtb_url %}
+ job.dtb_url: {{ dtb_url }}
+{%- else %}
+ job.dtb_url: None
+{%- endif %}
+{%- if initrd_url %}
+ job.initrd_url: {{ initrd_url }}
+{%- else %}
+ job.initrd_url: None
+{%- endif %}
{% if (change_id) and (patch_set) %} git.url: https://gerrit.automotivelinux.org/gerrit/#/c/{{ change_id }}/{{ patch_set }} {% endif %}
diff --git a/utils/agljobtemplate.py b/utils/agljobtemplate.py
index 639492c..28e06ec 100644
--- a/utils/agljobtemplate.py
+++ b/utils/agljobtemplate.py
@@ -6,6 +6,7 @@ import jinja2
import configparser
from urllib.parse import urlparse
from urllib.parse import urljoin
+from urllib.parse import urlsplit
import ast
@@ -188,6 +189,7 @@ class Agljobtemplate(object):
raise RuntimeError("{} is not an available test".format(t))
job['urlbase'] = url
+ job["resource_path"] = urlsplit(url).path.lstrip("/")
job['test_templates'] = test_templates
machine_branch = None
@@ -214,6 +216,9 @@ class Agljobtemplate(object):
if kernel_image is not None:
job['kernel_image'] = kernel_image
+ # hardcoded but arm/arm64/x86 are little by default
+ job["kernel_endian"] = 'little'
+
if dtb_image is not None:
job['dtb'] = dtb_image