File tree Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,8 @@ RUN curl -O https://ci-mirrors.rust-lang.org/rustc/vexpress-v2p-ca15-tc1.dtb
7878COPY scripts/sccache.sh /scripts/
7979RUN sh /scripts/sccache.sh
8080
81+ COPY static/gitconfig /etc/gitconfig
82+
8183ENV RUST_CONFIGURE_ARGS --qemu-armhf-rootfs=/tmp/rootfs
8284ENV SCRIPT python3 ../x.py --stage 2 test --host='' --target arm-unknown-linux-gnueabihf
8385
Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ ENV TARGETS=wasm32-unknown-emscripten
4848# Use -O1 optimizations in the link step to reduce time spent optimizing.
4949ENV EMCC_CFLAGS=-O1
5050
51+ COPY static/gitconfig /etc/gitconfig
52+
5153# Emscripten installation is user-specific
5254ENV NO_CHANGE_USER=1
5355
Original file line number Diff line number Diff line change 1+ [safe]
2+ directory = *
Original file line number Diff line number Diff line change @@ -11,6 +11,16 @@ if [ "$NO_CHANGE_USER" = "" ]; then
1111 useradd --shell /bin/bash -u $LOCAL_USER_ID -o -c " " -m user
1212 export HOME=/home/user
1313 unset LOCAL_USER_ID
14+
15+ # Ensure that runners are able to execute git commands in the worktree,
16+ # overriding the typical git protections. In our docker container we're running
17+ # as root, while the user owning the checkout is not root.
18+ # This is only necessary when we change the user, otherwise we should
19+ # already be running with the right user.
20+ #
21+ # For NO_CHANGE_USER done in the small number of Dockerfiles affected.
22+ echo -e ' [safe]\n\tdirectory = *' > /home/user/gitconfig
23+
1424 exec su --preserve-environment -c " env PATH=$PATH \" $0 \" " user
1525 fi
1626fi
You can’t perform that action at this time.
0 commit comments