+ if code == codes["not_found"]:
+ release = re.search(REGEX_RELEASE, job).group(2)
+ nexus_file_name = "{job}{sep}{build}{sep}{name}".\
+ format(job=job, sep=SEPARATOR, build=build["build"],
+ name=file_name)
+ try:
+ release = "rls{0}".format(int(release))
+ except ValueError:
+ pass
+ url = "{url}/{release}/{dir}/{file}".\
+ format(url=spec.environment["urls"]["URL[NEXUS]"],
+ release=release,
+ dir=spec.environment["urls"]["DIR[NEXUS]"],
+ file=nexus_file_name)
+ logging.info("Downloading the file '{0}' to '{1}' ...".
+ format(url, new_name))
+ response = get(url, stream=True)
+ code = response.status_code
+ if code != codes["OK"]:
+ logging.error(
+ "Nexus: {0}: {1}".format(code, responses[code]))
+ spec.set_input_state(
+ job, build["build"], "not found")
+ continue