From 02c16bc85fa21737cfb94be78e970e616f177965 Mon Sep 17 00:00:00 2001 From: yangbangcheng Date: Thu, 23 Nov 2023 16:18:10 +0800 Subject: [PATCH] CI: stop services debug print --- .gitlab-ci.yml | 2 +- copy_ci_test_saves.py | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ce93cfc..1e72fc3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ variables: PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" - CI_DEBUG_SERVICES: "true" + CI_DEBUG_SERVICES: "false" cache: key: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}" diff --git a/copy_ci_test_saves.py b/copy_ci_test_saves.py index 020a024..44298ad 100644 --- a/copy_ci_test_saves.py +++ b/copy_ci_test_saves.py @@ -1,6 +1,6 @@ -import glob import os import subprocess +import time test_dir = os.path.dirname(__file__) service_save_dir = "/var/lib/tomcat10/webapps/data/savegames/" @@ -27,14 +27,21 @@ def download_minitask_save(): # download zip # Download minigame.zip from google drive if not found in builds/$CI_PROJECT_PATH + # wait for cache being extracted + time.sleep(20) if os.path.isfile(zip_dir): print("Found minigame.zip!") else: print("Downloading minigame.zip...") - subprocess.check_call( - download_command, - shell=True, + call_output = str( + subprocess.check_output( + download_command, + shell=True, + ) ) + print(call_output) + # subprocess might carry on before fully returned + time.sleep(5) if not os.path.isfile(zip_dir): raise Exception( f"Failed to Download minigame.zip using download_command {download_command}"