Loading ci/setup_pages.py +5 −23 Original line number Diff line number Diff line Loading @@ -71,28 +71,6 @@ def setup_pages(project_id: int): raise ValueError(f"Invalid project ID: '{project_id}'") def html_table_from_csv_file(csv_path, html_path): TABLE_ROW = "<tr>{}</tr>" TABLE_HEADER_CELL = "<th>{}</th>" TABLE_CELL = "<td>{}</td>" with open(csv_path) as csv_file: reader = csv.DictReader(csv_file, delimiter=";") with open(html_path, "w") as html: print("<table>", file=html) header_row = "".join( [TABLE_HEADER_CELL.format(x) for x in reader.fieldnames] ) print(header_row, file=html) for csv_row in reader: html_row = TABLE_ROW.format( "".join([TABLE_CELL.format(csv_row[x]) for x in reader.fieldnames]) ) print(html_row, file=html) print("</table>", file=html) def get_artifacts_for_jobs_and_return_num_failed( jobs: list, project_id: int, success_only: bool ) -> int: Loading @@ -107,8 +85,12 @@ def get_artifacts_for_jobs_and_return_num_failed( for job in jobs: print(os.environ["CI_DEFAULT_BRANCH"], job.name, project_id, success_only) # TODO: change back before merginG!! # job_ids = get_job_ids( # os.environ["CI_DEFAULT_BRANCH"], job.name, project_id, success_only, job.n # ) job_ids = get_job_ids( os.environ["CI_DEFAULT_BRANCH"], job.name, project_id, success_only, job.n "ci/setup_gitlab_pages_for_ci_result_presentation", job.name, project_id, success_only, job.n ) print(f"{job_ids} - {job.name}") Loading Loading
ci/setup_pages.py +5 −23 Original line number Diff line number Diff line Loading @@ -71,28 +71,6 @@ def setup_pages(project_id: int): raise ValueError(f"Invalid project ID: '{project_id}'") def html_table_from_csv_file(csv_path, html_path): TABLE_ROW = "<tr>{}</tr>" TABLE_HEADER_CELL = "<th>{}</th>" TABLE_CELL = "<td>{}</td>" with open(csv_path) as csv_file: reader = csv.DictReader(csv_file, delimiter=";") with open(html_path, "w") as html: print("<table>", file=html) header_row = "".join( [TABLE_HEADER_CELL.format(x) for x in reader.fieldnames] ) print(header_row, file=html) for csv_row in reader: html_row = TABLE_ROW.format( "".join([TABLE_CELL.format(csv_row[x]) for x in reader.fieldnames]) ) print(html_row, file=html) print("</table>", file=html) def get_artifacts_for_jobs_and_return_num_failed( jobs: list, project_id: int, success_only: bool ) -> int: Loading @@ -107,8 +85,12 @@ def get_artifacts_for_jobs_and_return_num_failed( for job in jobs: print(os.environ["CI_DEFAULT_BRANCH"], job.name, project_id, success_only) # TODO: change back before merginG!! # job_ids = get_job_ids( # os.environ["CI_DEFAULT_BRANCH"], job.name, project_id, success_only, job.n # ) job_ids = get_job_ids( os.environ["CI_DEFAULT_BRANCH"], job.name, project_id, success_only, job.n "ci/setup_gitlab_pages_for_ci_result_presentation", job.name, project_id, success_only, job.n ) print(f"{job_ids} - {job.name}") Loading