aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Hilman <khilman@baylibre.com>2018-09-12 17:56:36 -0700
committerKevin Hilman <khilman@baylibre.com>2018-09-12 18:04:52 -0700
commitdde9d4700464db956f97fb0a5ee9338d57f362c6 (patch)
tree3a34feab424e766ca11835b38fc00e2451aef6e2
parentd327d7f2f7790b9538292444b9647d354bef392d (diff)
fix metadata for ci build-typeguppy_6.90.0guppy/6.90.06.90.0
When using --build-type=ci, the url_branch and url_version are repurposed for gerrit changeid and patchset. However, this means that the kernelCI metadata fields "branch" and "version" values are interpreted as integers by the backend, causing various problems. To add clarity to kernelCI fields, prefix with "changeid-" and "patchset-", and this also makes kernelci-backend interpret fields as strings, as expected. Change-Id: I6b648d9c94751a3ce20ec48c593d60b7e71640b1 Signed-off-by: Kevin Hilman <khilman@baylibre.com>
-rw-r--r--utils/agljobtemplate.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/utils/agljobtemplate.py b/utils/agljobtemplate.py
index dda2d77..493407f 100644
--- a/utils/agljobtemplate.py
+++ b/utils/agljobtemplate.py
@@ -152,10 +152,22 @@ class Agljobtemplate(object):
job['kernel_version'] = build_version
if url_version:
- job['kernel_version'] = url_version
+ kernel_version = url_version
+ # if this is an 'int', then it was --patchset
+ try:
+ kernel_version = "patchset-%d" % int(kernel_version)
+ except:
+ pass
+ job['kernel_version'] = kernel_version
if url_branch:
- job['vcs_branch'] = url_branch
+ vcs_branch = url_branch
+ # if this is an 'int', then it was --changeid
+ try:
+ vcs_branch = "changeid-%d" % int(vcs_branch)
+ except:
+ pass
+ job['vcs_branch'] = vcs_branch
if rfs_type is not None:
job['rootfs_type'] = rfs_type