[openssh-commits] [openssh] branch master updated: setup_ci.sh: add timeout and allow one retry

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Jun 1 22:40:52 AEST 2026


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

The following commit(s) were added to refs/heads/master by this push:
     new e8c12cc08 setup_ci.sh: add timeout and allow one retry
e8c12cc08 is described below

commit e8c12cc085272894e7c14eb761e82ec7c0d8f599
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Mon Jun 1 20:43:31 2026 +1000

    setup_ci.sh: add timeout and allow one retry
---
 .github/setup_ci.sh | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/.github/setup_ci.sh b/.github/setup_ci.sh
index fa5781813..22f0a6668 100755
--- a/.github/setup_ci.sh
+++ b/.github/setup_ci.sh
@@ -2,14 +2,29 @@
 
 config="$1"
 target="$2"
+retry="$3"
+
+timeout=3600
+
+fail ()		{ trap '' 0; exit 1; }
+success ()	{ trap '' 0; exit 0; }
+
+if [ "${retry}" != "retry" ]; then
+	echo Set trap for single retry with timeout at $timeout seconds.
+	trap "exec $0 $1 $2 retry" HUP
+	(sleep $timeout; kill -HUP $$) &
+	trap "kill $!; sleep 120; exec $0 $1 $2 retry" 0
+else
+	echo "$0: retrying"
+fi
 
 PACKAGES="tmux"
 
 echo Running as:
 id
 
-echo Environment:
-set
+echo Environment saved to env.txt
+set >env.txt
 
  . .github/configs ${config}
 
@@ -69,7 +84,7 @@ if [ ! -z "$SUDO" ]; then
 	fi
 	if ! "$SUDO" -u nobody -S test -x ~ </dev/null; then
 		echo "Still can't sudo to nobody."
-		exit 1
+		fail
 	fi
 fi
 
@@ -178,7 +193,7 @@ for TARGET in $TARGETS; do
     zlib-*)
        ;;
     *) echo "Invalid option '${TARGET}'"
-        exit 1
+        fail
         ;;
     esac
 done
@@ -301,3 +316,5 @@ if [ ! -z "${EPHEMERAL_VM}" ]; then
 	;;
     esac
 fi
+
+success

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list