From f592002fe5f7e30cbb9ee95fb942b6085ce4939b Mon Sep 17 00:00:00 2001 From: Khouloud Touil Date: Fri, 22 Mar 2019 14:00:19 +0100 Subject: 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 --- utils/job-prereq.py | 10 ++++++++-- 1 file 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: -- cgit