You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fa91bf2 ci: Skip git install if it is already installed (MarcoFalke)
c65fde4 ci: vary /tmp/env (Sjors Provoost)
Pull request description:
* Currently, running separate CI tasks at the same time may intermittently fail, because they race to read/write `/tmp/env`. Fix this by adding `$CONTAINER_NAME` to the file name.
* Also, add `$USER`, while touching the line, to allow different users to run the same CI task at the same time.
* Also, skip the git install if there is no need.
Ref: bitcoin/bitcoin#29274
ACKs for top commit:
Sjors:
ACK fa91bf2
BrandonOdiwuor:
ACK fa91bf2
hebasto:
ACK fa91bf2.
Tree-SHA512: 9a8479255a2afb6618f9d0796488d9430ba95266b90ce39536a9817c1974ca4049beeaab5355a38b25171f76fc386dbec06b1919aaa079f08a5a0c0a146232c8
Copy file name to clipboardExpand all lines: ci/test/02_run_container.sh
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,9 @@ set -ex
12
12
if [ -z"$DANGER_RUN_CI_ON_HOST" ];then
13
13
# Export all env vars to avoid missing some.
14
14
# Though, exclude those with newlines to avoid parsing problems.
15
-
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
15
+
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
16
# System-dependent env vars must be kept as is. So read them from the container.
17
-
docker run --rm "${CI_IMAGE_NAME_TAG}" bash -c "env | grep --extended-regexp '^(HOME|PATH|USER)='"| tee --append /tmp/env
17
+
docker run --rm "${CI_IMAGE_NAME_TAG}" bash -c "env | grep --extended-regexp '^(HOME|PATH|USER)='"| tee --append "/tmp/env-$USER-$CONTAINER_NAME"
18
18
echo"Creating $CI_IMAGE_NAME_TAG container to run in"
0 commit comments