From fa37559ac5b7bf83eefa30e7770ccae9fd19556b Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 29 Oct 2025 15:24:13 +0100 Subject: [PATCH] ci: Document the retry script in PATH The `retry` script is required for CI_RETRY_EXE and there are two ways to put it into PATH: * When running in a container engine, by copying it into /usr/bin * When running without a container engine, by prepending its location to PATH --- ci/test/02_run_container.py | 3 +++ ci/test/02_run_container.sh | 2 +- ci/test_imagefile | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/test/02_run_container.py b/ci/test/02_run_container.py index 79d9581be6f..0865350d092 100755 --- a/ci/test/02_run_container.py +++ b/ci/test/02_run_container.py @@ -56,6 +56,9 @@ def main(): os.environ["PREVIOUS_RELEASES_DIR"], ]: Path(create_dir).mkdir(parents=True, exist_ok=True) + + # Modify PATH to prepend the retry script, needed for CI_RETRY_EXE + os.environ["PATH"] = f"{os.environ['BASE_ROOT_DIR']}/ci/retry:{os.environ['PATH']}" else: CI_IMAGE_LABEL = "bitcoin-ci-test" diff --git a/ci/test/02_run_container.sh b/ci/test/02_run_container.sh index f462db25f9c..77c70f82bfa 100755 --- a/ci/test/02_run_container.sh +++ b/ci/test/02_run_container.sh @@ -13,7 +13,7 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then fi CI_EXEC () { - $CI_EXEC_CMD_PREFIX bash -c "export PATH=\"/path_with space:${BASE_ROOT_DIR}/ci/retry:\$PATH\" && cd \"${BASE_ROOT_DIR}\" && $*" + $CI_EXEC_CMD_PREFIX bash -c "export PATH=\"/path_with space:\$PATH\" && cd \"${BASE_ROOT_DIR}\" && $*" } export -f CI_EXEC diff --git a/ci/test_imagefile b/ci/test_imagefile index a0e1714ed5f..5c34d8efae0 100644 --- a/ci/test_imagefile +++ b/ci/test_imagefile @@ -14,6 +14,7 @@ ENV FILE_ENV=${FILE_ENV} ARG BASE_ROOT_DIR ENV BASE_ROOT_DIR=${BASE_ROOT_DIR} +# Make retry available in PATH, needed for CI_RETRY_EXE COPY ./ci/retry/retry /usr/bin/retry COPY ./ci/test/00_setup_env.sh ./${FILE_ENV} ./ci/test/01_base_install.sh /ci_container_base/ci/test/