Commit b4290476 authored by Jan Kiene's avatar Jan Kiene
Browse files

add missing arguments for get_idx

parent 75c08f03
Loading
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -31,13 +31,15 @@ PUBLIC_FOLDER = pathlib.Path("./public")


def main():

    project_id = int(os.environ["CI_PROJECT_ID"])
    jobs = JOBS_FOR_PROJECT_ID[project_id]

    PUBLIC_FOLDER.mkdir()

    failed_count = get_artifacts_for_jobs_and_return_num_failed(jobs)
    success_only = project_id == PROJECT_ID_FLOAT_REPO
    failed_count = get_artifacts_for_jobs_and_return_num_failed(
        jobs, project_id, success_only
    )

    if failed_count == len(jobs):
        print("Artifact collection failed for all jobs to check.")
@@ -60,7 +62,9 @@ def setup_pages(project_id: int):
        raise ValueError(f"Invalid project ID: '{project_id}'")


def get_artifacts_for_jobs_and_return_num_failed( jobs: dict) -> int:
def get_artifacts_for_jobs_and_return_num_failed(
    jobs: dict, project_id: int, success_only: bool
) -> int:
    """
    Get specified artifact folders for all jobs given and put them into the public folder.

@@ -71,7 +75,9 @@ def get_artifacts_for_jobs_and_return_num_failed( jobs: dict) -> int:
    failed_count = 0

    for job, artifact_folders in jobs.items():
        job_id = get_job_id(os.environ["CI_COMMIT_REF_NAME"], job)
        job_id = get_job_id(
            os.environ["CI_COMMIT_REF_NAME"], job, project_id, success_only
        )
        print(f"{job_id} - {job}")
        try:
            curl_for_artifacts(job_id)