summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils/agljobtemplate.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/agljobtemplate.py b/utils/agljobtemplate.py
index b4d44af..be46e92 100644
--- a/utils/agljobtemplate.py
+++ b/utils/agljobtemplate.py
@@ -94,6 +94,10 @@ class Agljobtemplate(object):
# If not a full url, read from config file
url_base, infra = parse_url_file(self._template_path, 'default.cfg', url)
if infra == 'AGL':
+ # If not set, create a build_version from other args
+ if (not build_version) and (url_branch) and (url_version):
+ build_version = 'AGL-' + url + '-' + url_branch + '-' + url_version
+
url_fragment = ''
if (url != 'default'):
url_fragment += url_branch + '/' + url_version + '/'
@@ -112,9 +116,6 @@ class Agljobtemplate(object):
job['test_templates'] = test_templates
- if (not build_version) and (url_branch) and (url_version):
- build_version = 'AGL-' + url + '-' + url_branch + '-' + url_version
-
if build_version is not None:
job['kernel_version'] = build_version