Commit 6b52c7324a
Unsigned
Layout: unified · split
.gitbay/ci.yml +7 −4
| @@ -10,9 +10,12 @@ | ||
| 10 | 10 | # blotter-ci account (write on this repository): its private key arrives |
| 11 | 11 | # as the BOT_SSH_KEY build secret and is written into the workspace for |
| 12 | 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 | |
| 14 | # reaches it. Nothing is written outside the workspace, so the job runs | |
| 15 | # the same in a container and on a machine that is somebody's own. | |
| 13 | # with -F. Every call shares one connection (ControlMaster): the runner's | |
| 14 | # network refuses gitbay.org:22 for a while after a burst of new SSH | |
| 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. | |
| 16 | 19 | jobs: |
| 17 | 20 | daily-pull: |
| 18 | 21 | schedule: "17 11,23 * * *" |
| @@ -24,7 +27,7 @@ jobs: | ||
| 24 | 27 | test -n "$GITBAY_SSH" || { echo "ERROR: GITBAY_SSH is not set; the runner is too old"; exit 1; } |
| 25 | 28 | umask 077 |
| 26 | 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 | 31 | ssh -F "$PWD/.ssh_config" "$GITBAY_SSH" whoami |
| 29 | 32 | - sh ci/pull-publish.sh |
| 30 | 33 | - | |