Set ServerAliveInterval to ping SSH server every 30 seconds

Otherwise connection may be dropped if there is no output for some time.
This commit is contained in:
link2xt
2021-05-23 13:10:24 +03:00
parent 15660f2741
commit 8b78e12b36

View File

@@ -29,7 +29,7 @@ set +x
for arch in "" "-arm64"; do
ssh -o ServerAliveInterval=30 $SSHTARGET bash -c "cat >${BUILDDIR}${arch}/exec_docker_run" <<_HERE
ssh $SSHTARGET bash -c "cat >${BUILDDIR}${arch}/exec_docker_run" <<_HERE
set +x -e
shopt -s huponexit
cd ${BUILDDIR}${arch}
@@ -48,10 +48,10 @@ done
echo "--- Running $CIRCLE_JOB remotely"
echo "--- Building aarch64 wheels"
ssh -t $SSHTARGET bash "$BUILDDIR-arm64/exec_docker_run"
ssh -o ServerAliveInterval=30 -t $SSHTARGET bash "$BUILDDIR-arm64/exec_docker_run"
echo "--- Building x86_64 wheels"
ssh -t $SSHTARGET bash "$BUILDDIR/exec_docker_run"
ssh -o ServerAliveInterval=30 -t $SSHTARGET bash "$BUILDDIR/exec_docker_run"
mkdir -p workspace