From a58a9d81d2e456ffd8b0af5a8cf1e0519cdb71b8 Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 21 Dec 2022 10:18:39 +0100 Subject: [PATCH 1/3] add command for actual unzipping the artifacts --- ci/setup_pages.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci/setup_pages.py b/ci/setup_pages.py index 4c418fe891..da914bb110 100755 --- a/ci/setup_pages.py +++ b/ci/setup_pages.py @@ -67,6 +67,11 @@ def curl_for_artifacts(job_id): print(f.read()) raise subprocess.CalledProcessError(-1, "Unzip check failed") + # do the actual unzipping + cmd = [ + "unzip", ARTIFACTS + ] + if __name__ == "__main__": main() \ No newline at end of file -- GitLab From ff4cb639b9279dc7b69c606f0aa498d7fc0cde9f Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 21 Dec 2022 10:19:25 +0100 Subject: [PATCH 2/3] run formatter --- ci/setup_pages.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ci/setup_pages.py b/ci/setup_pages.py index da914bb110..8bc2c40e79 100755 --- a/ci/setup_pages.py +++ b/ci/setup_pages.py @@ -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" @@ -30,9 +36,9 @@ def main(): job_public = "coverage" pathlib.Path(job_public).rename(public_folder.joinpath(job_public)) - + except subprocess.CalledProcessError: - print(f"Could not get artifacts for {job}") + print(f"Could not get artifacts for {job}") failed_count += 1 if failed_count == len(JOBS): @@ -49,17 +55,13 @@ 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: @@ -68,10 +70,8 @@ def curl_for_artifacts(job_id): raise subprocess.CalledProcessError(-1, "Unzip check failed") # do the actual unzipping - cmd = [ - "unzip", ARTIFACTS - ] + cmd = ["unzip", ARTIFACTS] if __name__ == "__main__": - main() \ No newline at end of file + main() -- GitLab From f852d27439676e452d7a9be0bd370c49aef53e3f Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 21 Dec 2022 10:20:57 +0100 Subject: [PATCH 3/3] actually run the unzip command --- ci/setup_pages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/setup_pages.py b/ci/setup_pages.py index 8bc2c40e79..a8dffafa13 100755 --- a/ci/setup_pages.py +++ b/ci/setup_pages.py @@ -57,7 +57,6 @@ def curl_for_artifacts(job_id): "--output", ARTIFACTS, ] - print(" ".join(cmd)) subprocess.run(cmd, check=True) # check for valid archive (if not, it is likely a 404 page, then display that) @@ -71,6 +70,7 @@ def curl_for_artifacts(job_id): # do the actual unzipping cmd = ["unzip", ARTIFACTS] + subprocess.run(cmd, check=True) if __name__ == "__main__": -- GitLab