Commit 73eac5cc authored by Jan Kiene's avatar Jan Kiene
Browse files

for basop repo copy the main page

parent 052819f4
Loading
Loading
Loading
Loading
Loading
+4 −13
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ PUBLIC_FOLDER = pathlib.Path("./public").absolute()

def main():
    PUBLIC_FOLDER.mkdir()
    print(list(pathlib.Path("./").iterdir()))

    project_id = int(os.environ["CI_PROJECT_ID"])
    jobs = JOBS_FOR_PROJECT_ID[project_id]
@@ -50,23 +49,15 @@ def main():
        print("Artifact collection failed for all jobs to check.")
        sys.exit(1)

    setup_pages(project_id)

    print(list(PUBLIC_FOLDER.iterdir()))

    sys.exit(0)


def setup_pages(project_id: int):
    index_html = PUBLIC_FOLDER.joinpath("index.html")

    if project_id == PROJECT_ID_FLOAT_REPO:
        src = pathlib.Path("ci/index-pages.html").absolute()
        shutil.move(src, index_html)
    elif project_id == PROJECT_ID_BASOP_REPO:
        pass
    else:
        raise ValueError(f"Invalid project ID: '{project_id}'")
        src = pathlib.Path("ci/basop-pages/basop_index.html").absolute()
        shutil.move(src, index_html)

    sys.exit(0)


def get_artifacts_for_jobs_and_return_num_failed(