aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorKhouloud Touil <ktouil@baylibre.com>2019-02-18 11:28:38 +0100
committerKhouloud Touil <ktouil@baylibre.com>2019-02-28 10:04:55 +0100
commit977be2a5c2b3205a15ee79616d85cae57e578191 (patch)
tree3c0ab2fc021609a9975294978adba25a0b9cc170 /utils
parent2a7259d308ebd8e9d28c47e72fae460a1ca2a1b2 (diff)
Use the --branch argument differently
Change the use of the --branch argument to display in the vsc_branch metadata field the AGL branch used in the build and get ride of the hard coded value "agl-branch". Change-Id: I9ff371248569c40ab9980347da14110e5227e1db Signed-off-by: Khouloud Touil <ktouil@baylibre.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/agljobtemplate.py14
-rwxr-xr-xutils/create-jobs.py2
2 files changed, 5 insertions, 11 deletions
diff --git a/utils/agljobtemplate.py b/utils/agljobtemplate.py
index cfdf825..e1bddc2 100644
--- a/utils/agljobtemplate.py
+++ b/utils/agljobtemplate.py
@@ -89,7 +89,7 @@ class Agljobtemplate(object):
job_name="AGL-short-smoke", priority="medium", tests=[], rfs_type=None,
lava_callback=None, kci_callback=None,
rfs_image=None, kernel_image=None, dtb_image=None, modules_image=None,
- build_type=None, vcs_commit=None,
+ build_type=None, vcs_commit=None, vcs_branch=None,
build_version=None, device_tags=""):
if machine not in self.machines:
@@ -167,18 +167,12 @@ class Agljobtemplate(object):
elif build_version_default:
job['kernel_version'] = build_version_default
- if url_branch:
- vcs_branch = url_branch
- # if this is an 'int', then it was --changeid
- try:
- vcs_branch = "gerrit-%d" % int(vcs_branch)
- except:
- pass
- job['vcs_branch'] = vcs_branch
-
if vcs_commit is not None:
job['vcs_commit'] = vcs_commit
+ if vcs_branch is not None:
+ job['vcs_branch'] = vcs_branch
+
if rfs_type is not None:
job['rootfs_type'] = rfs_type
diff --git a/utils/create-jobs.py b/utils/create-jobs.py
index 0d6b0d7..48df1bc 100755
--- a/utils/create-jobs.py
+++ b/utils/create-jobs.py
@@ -87,7 +87,7 @@ def main():
rfs_image=args.rootfs_img, version=args.version,
kernel_image=args.kernel_img,
dtb_image=args.dtb_img,
- modules_image=args.modules_img,
+ modules_image=args.modules_img, vcs_branch=args.vcs_branch,
build_type=args.build_type, vcs_commit=args.vcs_commit,
build_version=args.build_version, device_tags=args.device_tags)