summaryrefslogtreecommitdiffstats
path: root/utils/create-jobs.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/create-jobs.py')
-rwxr-xr-xutils/create-jobs.py25
1 files changed, 10 insertions, 15 deletions
diff --git a/utils/create-jobs.py b/utils/create-jobs.py
index e9701a5..28fefa4 100755
--- a/utils/create-jobs.py
+++ b/utils/create-jobs.py
@@ -17,12 +17,14 @@ def parse_cmdline(machines, tests, rfs_types):
help="job priority",
default='medium')
parser.add_argument('--url', '-u', action='store', dest='url',
- help="url fetch base",
- default='release')
+ help="If using a custom URL specify it there. The files will be fetched from this URL.")
+ parser.add_argument('--build-type', dest='build_type', action='store',
+ help="The type of build, can be one of: {'ci', 'daily', 'weekly', 'release'}.",
+ default="default")
parser.add_argument('--branch', '--changeid', dest='url_branch', action='store',
- help='The branch (or changeid) to generate the job for.')
+ help='The build branch (or changeid).')
parser.add_argument('--version', '--patchset', dest='url_version', action='store',
- help='The version (or patchset) to generate the job for.')
+ help='The build version (or patchset).')
parser.add_argument('--boot', action='store', dest='rfs_type',
choices=rfs_types, help='select boot type')
parser.add_argument('--callback-from', action='store', dest='callback_from',
@@ -46,24 +48,16 @@ def parse_cmdline(machines, tests, rfs_types):
parser.add_argument('--modules-img', dest='modules_img', action='store',
help="The name of the modules to use (such as modules.tar.xz)")
parser.add_argument('--build-version', dest='build_version', action='store',
- help="the version number of the AGL build.")
+ help="the version number of the build.")
args = parser.parse_args()
if (bool(args.callback_from) ^ bool(args.callback_to)):
parser.error("To specify callbacks both '--callback-to' and '--callback-from' are mandatory.")
- if (args.url == 'release'):
- if (args.url_branch is None) and (args.url_version is None):
- args.url = 'default'
- elif (args.url_branch is not None) != (args.url_version is not None):
- parser.error("Both arguments: '--branch' and '--version' needs to be set")
- elif (args.url == 'daily'):
+ if (args.build_type is not "default") and (args.url is None):
if (not args.url_branch) or (not args.url_version):
- parser.error("The argument '--url daily' requires '--branch' and '--version' to be set")
- elif (args.url == 'ci'):
- if (not args.url_branch) or (not args.url_version):
- parser.error("The argument '--url ci' requires '--changeid' and '--patchset' to be set.")
+ parser.error("when using '--build-type' either '--url' or '--branch' and '--version' arguments needs to be set.")
return args
@@ -85,6 +79,7 @@ def main():
kernel_image=args.kernel_img,
dtb_image=args.dtb_img,
modules_image=args.modules_img,
+ build_type=args.build_type,
build_version=args.build_version)
if args.job_file is None: