krz/omaha-metro-blotter

Archive of police activity and ALPR surveillance across the Omaha metro. alpr archive omaha police surveillance

Commit 6b52c7324a

6b52c7324ab89e599e277d1ccd1178bd019d963d

parent: af9e66afcb

Unsigned

cmc <hello@cleberg.net> · 2026-10-31 09:16 UTC

ci: share one SSH connection across the build

The homelab runner's network refuses gitbay.org:22 for several minutes
after a burst of new SSH connections, and a publish opens about ten.
The generated ssh config now sets ControlMaster, so every ssh and git
call in the build reuses one connection.

Layout: unified · split

.gitbay/ci.yml +7 −4
@@ -10,9 +10,12 @@
10# blotter-ci account (write on this repository): its private key arrives 10# blotter-ci account (write on this repository): its private key arrives
11# as the BOT_SSH_KEY build secret and is written into the workspace for 11# as the BOT_SSH_KEY build secret and is written into the workspace for
12# the build, beside an ssh config every ssh and git call is pointed at 12# the build, beside an ssh config every ssh and git call is pointed at
13# with -F. GITBAY_SSH, set by the runner, is the instance as this build 13# with -F. Every call shares one connection (ControlMaster): the runner's
14# reaches it. Nothing is written outside the workspace, so the job runs 14# network refuses gitbay.org:22 for a while after a burst of new SSH
15# the same in a container and on a machine that is somebody's own. 15# connections, and a publish makes about ten. GITBAY_SSH, set by the
16# runner, is the instance as this build reaches it. Nothing is written
17# outside the workspace, so the job runs the same in a container and on a
18# machine that is somebody's own.
16jobs: 19jobs:
17 daily-pull: 20 daily-pull:
18 schedule: "17 11,23 * * *" 21 schedule: "17 11,23 * * *"
@@ -24,7 +27,7 @@ jobs:
24 test -n "$GITBAY_SSH" || { echo "ERROR: GITBAY_SSH is not set; the runner is too old"; exit 1; } 27 test -n "$GITBAY_SSH" || { echo "ERROR: GITBAY_SSH is not set; the runner is too old"; exit 1; }
25 umask 077 28 umask 077
26 printf '%s\n' "$BOT_SSH_KEY" > "$PWD/.bot_key" 29 printf '%s\n' "$BOT_SSH_KEY" > "$PWD/.bot_key"
27 printf 'IdentityFile %s\nIdentitiesOnly yes\nStrictHostKeyChecking accept-new\nUserKnownHostsFile %s\n' "$PWD/.bot_key" "$PWD/.known_hosts" > "$PWD/.ssh_config" 30 printf 'IdentityFile %s\nIdentitiesOnly yes\nStrictHostKeyChecking accept-new\nUserKnownHostsFile %s\nControlMaster auto\nControlPath %s/.cm-%%C\nControlPersist 10m\n' "$PWD/.bot_key" "$PWD/.known_hosts" "$PWD" > "$PWD/.ssh_config"
28 ssh -F "$PWD/.ssh_config" "$GITBAY_SSH" whoami 31 ssh -F "$PWD/.ssh_config" "$GITBAY_SSH" whoami
29 - sh ci/pull-publish.sh 32 - sh ci/pull-publish.sh
30 - | 33 - |