diff options
author | Matt Hart <matthew.hart@linaro.org> | 2018-11-16 15:26:57 +0000 |
---|---|---|
committer | Guillaume Tucker <guillaume.tucker@collabora.com> | 2018-12-07 13:23:52 +0000 |
commit | 19d14d730d0df99eb9dd512f42e0b8729c677244 (patch) | |
tree | 7b845f2c9da271037bb01a009313dbdf577c9a06 /lava-v2-jobs-from-api.py | |
parent | d2997d6e822f8a4ffadac23bd8d984bac0659b81 (diff) |
Use file_server_resource for job urls
As the build document should now contain a path to the build artifacts,
use this for the urls in the generated LAVA jobs, and also in the yaml
filename to ensure they are unique.
Diffstat (limited to 'lava-v2-jobs-from-api.py')
-rwxr-xr-x | lava-v2-jobs-from-api.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lava-v2-jobs-from-api.py b/lava-v2-jobs-from-api.py index f7023c5..59ce1f9 100755 --- a/lava-v2-jobs-from-api.py +++ b/lava-v2-jobs-from-api.py @@ -107,12 +107,17 @@ def get_job_params(config, test_config, defconfig, opts, build, plan): if arch == 'arm64' and dtb: dtb = opts['dtb'] = os.path.basename(dtb) - job_name = '-'.join([ - config.get('tree'), config.get('branch'), config.get('describe'), - arch, defconfig, dtb or 'no-dtb', device_type.name, plan]) + file_server_resource = build.get('file_server_resource') + if file_server_resource: + job_name_prefix = file_server_resource.replace('/', '-') + url_px = file_server_resource + else: + parts = [build['job'], build['git_branch'], build['kernel'], arch, defconfig] + job_name_prefix = '-'.join(parts) + url_px = '/'.join(parts) + + job_name = '-'.join([job_name_prefix, dtb or 'no-dtb', device_type.name, plan]) - url_px = '/'.join([ - build['job'], build['git_branch'], build['kernel'], arch, defconfig]) base_url = urlparse.urljoin(storage, '/'.join([url_px, ''])) kernel_url = urlparse.urljoin( storage, '/'.join([url_px, build['kernel_image']])) |