ci: Document the retry script in PATH
What changed, and why it matters
This commit is a documentation and code cleanup change for Bitcoin Core's continuous integration (CI) system. It makes sure the 'retry' helper script is available in the system PATH both when running tests inside a container and when running directly on the host. There is no security vulnerability here.
No security action needed. This is a normal CI maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change updates three CI files to consistently make the ci/retry/retry script available via PATH for CI_RETRY_EXE. In the Python runner, it prepends BASE_ROOT_DIR/ci/retry to PATH when running without a container. In the shell runner, it removes the hardcoded retry path from the CI_EXEC bash command because the Dockerfile now copies retry into /usr/bin. The Dockerfile gets a comment explaining the COPY instruction. This is purely a CI maintainability/documentation improvement.
Changed components
ci/test/02_run_container.pyci/test/02_run_container.shci/test_imagefileInspect captured patch +5 / −1
diff --git a/ci/test/02_run_container.py b/ci/test/02_run_container.py
index 79d9581b..0865350d 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 f462db25..77c70f82 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 a0e1714e..5c34d8ef 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/
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.