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

Merge branch 'fix_pages_job' into 'main'

Another round of fixing the pages job

See merge request !357
parents db02e0d2 f852d274
Loading
Loading
Loading
Loading
Loading
+16 −11
Original line number Diff line number Diff line
@@ -6,7 +6,13 @@ import subprocess
from get_id_of_last_job_occurence import get_job_id

JOBS = [
    "complexity-stereo-in-stereo-out", "complexity-ism-in-binaural-out", "complexity-sba-hoa3-in-hoa3-out", "complexity-mc-in-7_1_4-out", "complexity-masa-in-7_1_4-out", "complexity-StereoDmxEVS-stereo-in-mono-out", "coverage-test-on-main-scheduled"
    "complexity-stereo-in-stereo-out",
    "complexity-ism-in-binaural-out",
    "complexity-sba-hoa3-in-hoa3-out",
    "complexity-mc-in-7_1_4-out",
    "complexity-masa-in-7_1_4-out",
    "complexity-StereoDmxEVS-stereo-in-mono-out",
    "coverage-test-on-main-scheduled",
]
ARTIFACTS = "artifacts.zip"
API_URL_BASE = "https://forge.3gpp.org/rep/api/v4/projects/{}/jobs"
@@ -49,17 +55,12 @@ def curl_for_artifacts(job_id):
        "GET",
        API_URL_BASE.format(os.environ["CI_PROJECT_ID"]) + f"/{job_id}/artifacts",
        "--output",
        ARTIFACTS
        ARTIFACTS,
    ]
    print(" ".join(cmd))
    subprocess.run(cmd, check=True)

    # check for valid archive (if not, it is likely a 404 page, then display that)
    cmd = [
        "unzip",
        "-t",
        ARTIFACTS
    ]
    cmd = ["unzip", "-t", ARTIFACTS]
    try:
        subprocess.run(cmd, check=True)
    except subprocess.CalledProcessError:
@@ -67,6 +68,10 @@ def curl_for_artifacts(job_id):
            print(f.read())
        raise subprocess.CalledProcessError(-1, "Unzip check failed")

    # do the actual unzipping
    cmd = ["unzip", ARTIFACTS]
    subprocess.run(cmd, check=True)


if __name__ == "__main__":
    main()