Skip to content

Commit fa952ac

Browse files
author
MarcoFalke
committed
ci: Skip read-write of default env vars
Also, set pipefail while touching the script.
1 parent eb243ff commit fa952ac

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ci/test/02_run_container.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@
77
export LC_ALL=C.UTF-8
88
export CI_IMAGE_LABEL="bitcoin-ci-test"
99

10-
set -ex
10+
set -o errexit -o pipefail -o xtrace
1111

1212
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
1313
# Export all env vars to avoid missing some.
1414
# Though, exclude those with newlines to avoid parsing problems.
1515
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-$USER-$CONTAINER_NAME"
16-
# System-dependent env vars must be kept as is. So read them from the container.
17-
docker run --platform="${CI_IMAGE_PLATFORM}" --rm "${CI_IMAGE_NAME_TAG}" bash -c "env | grep --extended-regexp '^(HOME|PATH|USER)='" | tee --append "/tmp/env-$USER-$CONTAINER_NAME"
1816

1917
# Env vars during the build can not be changed. For example, a modified
2018
# $MAKEJOBS is ignored in the build process. Use --cpuset-cpus as an

0 commit comments

Comments
 (0)