ci: Avoid leaking HOME var into CI pod

This will lead to a duplicate install, see https://github.com/bitcoin/bitcoin/pull/27739#issuecomment-1564122573
This commit is contained in:
MarcoFalke 2023-05-26 17:09:07 +02:00
parent aaaa432603
commit fa12558d21
No known key found for this signature in database

View File

@ -28,7 +28,7 @@ export BINS_SCRATCH_DIR="${BASE_SCRATCH_DIR}/bins/"
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
# Export all env vars to avoid missing some. # Export all env vars to avoid missing some.
# Though, exclude those with newlines to avoid parsing problems. # Though, exclude those with newlines to avoid parsing problems.
python3 -c 'import os; [print(f"{key}={value}") for key, value in os.environ.items() if "\n" not in value]' | tee /tmp/env python3 -c 'import os; [print(f"{key}={value}") for key, value in os.environ.items() if "\n" not in value and "HOME" not in key]' | tee /tmp/env
echo "Creating $CI_IMAGE_NAME_TAG container to run in" echo "Creating $CI_IMAGE_NAME_TAG container to run in"
DOCKER_BUILDKIT=1 ${CI_RETRY_EXE} docker build \ DOCKER_BUILDKIT=1 ${CI_RETRY_EXE} docker build \
--file "${BASE_ROOT_DIR}/ci/test_imagefile" \ --file "${BASE_ROOT_DIR}/ci/test_imagefile" \