From 0535413a98ace7cbf301bba18dd95254302d584f Mon Sep 17 00:00:00 2001 From: Loys Ollivier Date: Fri, 8 Sep 2017 09:57:39 +0200 Subject: Add callback option to command line The callback option takes one argument. It is the name of the file located in ./templates/callback/ that contains all the "secret" information such as the callback FQDN, lab name and token. A readme is provided: ./templates/callback/callback_readme.txt Change-Id: Id457d90eba0d1312e43246ca607289ad829fd55f Signed-off-by: Loys Ollivier Signed-off-by: Kevin Hilman --- utils/create-jobs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'utils/create-jobs.py') diff --git a/utils/create-jobs.py b/utils/create-jobs.py index 2bc293d..ebf2188 100755 --- a/utils/create-jobs.py +++ b/utils/create-jobs.py @@ -20,6 +20,8 @@ def parse_cmdline(machines, tests, rfs_types): default='https://download.automotivelinux.org/AGL/upload/ci/') parser.add_argument('--boot', action='store', dest='rfs_type', choices=rfs_types, help='select boot type') + parser.add_argument('--callback', action='store', dest='callback', + help='url to notify when job is done. Please read: ./templates/callback/callback_readme.txt') parser.add_argument('--test', dest='tests', action='store', choices=tests + ['all'], help="add these test to the job", nargs='*', default=[]) parser.add_argument('-o', '--output', dest='job_file', action='store', @@ -50,7 +52,7 @@ def main(): args.job_name += ' - {}'.format(args.job_index) job = ajt.render_job(args.urlbase, args.machine, tests=args.tests, priority=args.priority, - rfs_type=args.rfs_type, job_name=args.job_name) + rfs_type=args.rfs_type, job_name=args.job_name, kci_callback=args.callback) if args.job_file is None: print job -- cgit 1.2.3-korg