summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/agljobtemplate.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/agljobtemplate.py b/utils/agljobtemplate.py
index 28e06ec..3f4d960 100644
--- a/utils/agljobtemplate.py
+++ b/utils/agljobtemplate.py
@@ -8,7 +8,7 @@ from urllib.parse import urlparse
from urllib.parse import urljoin
from urllib.parse import urlsplit
import ast
-
+import random
def get_extension(path):
return path.split('.')[-1]
@@ -107,6 +107,11 @@ class Agljobtemplate(object):
job['build_type'] = build_type
job['image_type'] = "AGL-%s" % build_type
+ if patchset != None:
+ job["uniqid"] = "AGL-%s-%s-%s-%d" % (machine, changeid, patchset, random.randint(1, 999999))
+ else:
+ job["uniqid"] = "AGL-%s-%s-%s-%d" % (machine, branch, version, random.randint(1, 999999))
+
defaults, infra = parse_cfg_file(self._template_path, 'default.cfg', build_type)
# If the user doesn't specify an URL, use the default one from the build-type