diff options
Diffstat (limited to 'resources')
-rw-r--r-- | resources/tools/presentation/generator_CPTA.py | 2 | ||||
-rw-r--r-- | resources/tools/presentation/input_data_files.py | 15 | ||||
-rw-r--r-- | resources/tools/presentation/specification_CPTA.yaml | 2 |
3 files changed, 13 insertions, 6 deletions
diff --git a/resources/tools/presentation/generator_CPTA.py b/resources/tools/presentation/generator_CPTA.py index a1921fad9d..92244c2610 100644 --- a/resources/tools/presentation/generator_CPTA.py +++ b/resources/tools/presentation/generator_CPTA.py @@ -426,7 +426,7 @@ def _generate_all_charts(spec, input_data): # Generate the chart: period_name = "Daily" if period == 1 else \ "Weekly" if period < 20 else "Monthly" - chart["layout"]["title"] = chart["title"].format(period=period_name) + # chart["layout"]["title"] = chart["title"].format(period=period_name) _generate_chart(traces, chart["layout"], file_name="{0}-{1}-{2}{3}".format( diff --git a/resources/tools/presentation/input_data_files.py b/resources/tools/presentation/input_data_files.py index 7e19478570..439c0d88bd 100644 --- a/resources/tools/presentation/input_data_files.py +++ b/resources/tools/presentation/input_data_files.py @@ -37,7 +37,7 @@ CHUNK_SIZE = 512 # Separator used in file names SEPARATOR = "__" -REGEX_RELEASE = re.compile(r'(\D*)(\d{4})(\D*)') +REGEX_RELEASE = re.compile(r'(\D*)(\d{4}|master)(\D*)') def download_data_files(spec): @@ -81,6 +81,13 @@ def download_data_files(spec): try: response = get(url, stream=True) code = response.status_code + # temporary workaround, remove when output.log.xml is not needed + if code != codes["OK"] and \ + spec.input["file-name"].endswith(".gz"): + url = '.'.join(url.split('.')[:-1]) + ".log.gz" + response = get(url, stream=True) + code = response.status_code + if code != codes["OK"]: logging.warning( "Jenkins: {0}: {1}.".format(code, responses[code])) @@ -139,11 +146,11 @@ def download_data_files(spec): logging.info("{0}: {1}".format(code, responses[code])) elif spec.input["file-name"].endswith(".gz"): - rename(new_name, new_name[:-7]) - with open(new_name[:-7], 'r') as xml_file: + rename(new_name, new_name[:-3]) + with open(new_name[:-3], 'r') as xml_file: with gzip.open(new_name, 'wb') as gz_file: gz_file.write(xml_file.read()) - new_name = new_name[:-7] + new_name = new_name[:-3] status = "downloaded" logging.info("{0}: {1}".format(code, responses[code])) diff --git a/resources/tools/presentation/specification_CPTA.yaml b/resources/tools/presentation/specification_CPTA.yaml index 6101425783..6b5c7fad1f 100644 --- a/resources/tools/presentation/specification_CPTA.yaml +++ b/resources/tools/presentation/specification_CPTA.yaml @@ -179,7 +179,7 @@ - type: "input" # Ignored in debug mode general: - file-name: "output.xml.log.gz" + file-name: "output.xml.gz" file-format: ".gz" download-path: "{job}/{build}/archives/{filename}" extract: "output.xml" |