summaryrefslogtreecommitdiffstats
path: root/utils/job-prereq.py
diff options
context:
space:
mode:
authorKhouloud Touil <ktouil@baylibre.com>2019-03-22 14:00:19 +0100
committerKhouloud Touil <ktouil@baylibre.com>2019-03-22 14:00:19 +0100
commitf592002fe5f7e30cbb9ee95fb942b6085ce4939b (patch)
tree2234d96cd33e4bb9f5c3ac508b7dda63ec3763d5 /utils/job-prereq.py
parent6188025b85d63061fdaaaab840a60681f46194f3 (diff)
Fix the job parameters
This patch fixes the job parameters, if the build type is ci the parameters will be parsed as changeid and patchset otherwise it will be parsed as branch and version. Change-Id: I3f9abfd91a1b551974dd82ea82dc97a2e0a11d95 Signed-off-by: Khouloud Touil <ktouil@baylibre.com>
Diffstat (limited to 'utils/job-prereq.py')
-rwxr-xr-xutils/job-prereq.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/utils/job-prereq.py b/utils/job-prereq.py
index 56a50ba..ba51270 100755
--- a/utils/job-prereq.py
+++ b/utils/job-prereq.py
@@ -50,11 +50,17 @@ def main():
templates_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../templates')
ajt = agljobtemplate.Agljobtemplate(templates_dir)
args = parse_cmdline(ajt.machines)
-
- job = ajt.render_job(build_type=args.build_type[0],
+ if args.build_type == "ci":
+ job = ajt.render_job(build_type=args.build_type[0],
changeid=args.build_type[1],
patchset=args.build_type[2],
machine=args.machine)
+ else:
+ job = ajt.render_job(build_type=args.build_type[0],
+ vcs_branch=args.build_type[1],
+ version=args.build_type[2],
+ machine=args.machine)
+
job_yaml = yaml.load(job)
if args.machine == "qemux86-64":
for key in FILE_MAP_QEMU: