aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuildos53
1 files changed, 45 insertions, 8 deletions
diff --git a/buildos b/buildos
index a52a5e7..4bb44b9 100755
--- a/buildos
+++ b/buildos
@@ -287,21 +287,37 @@ function print ()
tu="$(toolchain_value "$tp" toolchain_url)"
tt="$(toolchain_value "$tp" toolchain_trust)"
- echo "$tn.nice: $tc"
- echo "$tn.bridge: $tb"
- echo "$tn.instances: $ti"
- echo "$tn.interactive: $ta"
- echo "$tn.toolchain_url: $tu"
- echo "$tn.toolchain_trust: $tt"
+ tbt="$(toolchain_value "$tp" build_timeout)"
+ tst="$(toolchain_value "$tp" bootstrap_timeout)"
+ tat="$(toolchain_value "$tp" interactive_timeout)"
+
+ echo "$tn.nice: $tc"
+ echo "$tn.bridge: $tb"
+ echo "$tn.instances: $ti"
+ echo "$tn.interactive: $ta"
+ echo "$tn.toolchain_url: $tu"
+ echo "$tn.toolchain_trust: $tt"
+
+ if [ -n "$tbt" ]; then
+ echo "$tn.build_timeout: $tbt"
+ fi
+
+ if [ -n "$tst" ]; then
+ echo "$tn.bootstrap_timeout: $tst"
+ fi
+
+ if [ -n "$tat" ]; then
+ echo "$tn.interactive_timeout: $tat"
+ fi
n="${tp}controller_url[@]"
for i in "${!n}"; do
- echo "$tn.controller_url: $i"
+ echo "$tn.controller_url: $i"
done
n="${tp}controller_trust[@]"
for i in "${!n}"; do
- echo "$tn.controller_trust: $i"
+ echo "$tn.controller_trust: $i"
done
echo
@@ -814,6 +830,10 @@ function bbot_start () # <toolchain-name> <toolchain-index>
local tv="$(toolchain_value "$tp" toolchain_fver)"
local ts="$(toolchain_value "$tp" toolchain_file_csum)"
+ local tbt="$(toolchain_value "$tp" build_timeout)"
+ local tst="$(toolchain_value "$tp" bootstrap_timeout)"
+ local tat="$(toolchain_value "$tp" interactive_timeout)"
+
local id="/build/bots/$tn"
mkdir -p "$id"
@@ -889,6 +909,23 @@ function bbot_start () # <toolchain-name> <toolchain-index>
-e "s#^ExecStart=[^ ]+(.*)#ExecStart=$id/bin/bbot-agent\1#" \
"$id/lib/systemd/system/bbot-agent@.service"
+ # Patch in build/bootstrap/interactive timeouts.
+ #
+ if [ -n "$tbt" ]; then
+ sed -i -r -e "s/^(Environment=BUILD_TIMEOUT)=.*/\1=$tbt/" \
+ "$id/lib/systemd/system/bbot-agent@.service"
+ fi
+
+ if [ -n "$tst" ]; then
+ sed -i -r -e "s/^(Environment=BOOTSTRAP_TIMEOUT)=.*/\1=$tst/" \
+ "$id/lib/systemd/system/bbot-agent@.service"
+ fi
+
+ if [ -n "$tat" ]; then
+ sed -i -r -e "s/^(Environment=INTERACTIVE_TIMEOUT)=.*/\1=$tat/" \
+ "$id/lib/systemd/system/bbot-agent@.service"
+ fi
+
# Patch in the controller URLs. These can contain special characters
# like `&` so we have to escape them.
#