mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-09 10:43:19 -05:00
ci: Keep system env vars as-is
This commit is contained in:
parent
fa8dcdcc8b
commit
fabc04a4d9
1 changed files with 3 additions and 1 deletions
|
@ -25,7 +25,9 @@ fi
|
||||||
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 and "HOME" not in key]' | 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" != key and "PATH" != key and "USER" != key]' | tee /tmp/env
|
||||||
|
# System-dependent env vars must be kept as is. So read them from the container.
|
||||||
|
docker run --rm "${CI_IMAGE_NAME_TAG}" bash -c "env | grep --extended-regexp '^(HOME|PATH|USER)='" | tee --append /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 docker build \
|
DOCKER_BUILDKIT=1 docker build \
|
||||||
--file "${BASE_ROOT_DIR}/ci/test_imagefile" \
|
--file "${BASE_ROOT_DIR}/ci/test_imagefile" \
|
||||||
|
|
Loading…
Add table
Reference in a new issue