- file_name = spec.input["file-name"]
- url = "{0}/{1}".format(
- spec.environment["urls"]["URL[NEXUS,LOG]"],
- spec.input["download-path"].format(
- job=job, build=build["build"], filename=file_name))
- new_name = join(spec.environment["paths"]["DIR[WORKING,DATA]"],
- "{job}{sep}{build}{sep}{name}".format(
- job=job, sep=SEPARATOR, build=build["build"],
- name=file_name))
-
- logging.info("Trying to download {0}".format(url))
-
- arch = True if spec.configuration.get("archive-inputs", True) else False
- success, downloaded_name = _download_file(url, new_name, log, arch=arch)
-
- if not success:
-
- # Try to download .gz from docs.fd.io
-
- file_name = spec.input["file-name"]
- url = "{0}/{1}".format(
- spec.environment["urls"]["URL[NEXUS,DOC]"],
- spec.input["download-path"].format(
- job=job, build=build["build"], filename=file_name))
- new_name = join(spec.environment["paths"]["DIR[WORKING,DATA]"],
- "{job}{sep}{build}{sep}{name}".format(
- job=job, sep=SEPARATOR, build=build["build"],
- name=file_name))
+ file_name = spec.input[u"file-name"]
+ url = u"{0}/{1}".format(
+ spec.environment[u'urls'][u'URL[NEXUS,LOG]'],
+ spec.input[u'download-path'].format(
+ job=job, build=build[u'build'], filename=file_name
+ )
+ )
+ new_name = join(
+ spec.environment[u"paths"][u"DIR[WORKING,DATA]"],
+ f"{job}{SEPARATOR}{build[u'build']}{SEPARATOR}{file_name}"
+ )