From 9b0153c9ace655c190f7dc6c52060214ac273026 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Wed, 24 Mar 2021 16:16:17 +0100 Subject: [PATCH] fix: reuse same connection Signed-off-by: Valentin Lab --- .../update-pre-build.d/ensure-git-0k-access.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.drone.d/update-pre-build.d/ensure-git-0k-access.sh b/.drone.d/update-pre-build.d/ensure-git-0k-access.sh index 17c5458..9c084d1 100644 --- a/.drone.d/update-pre-build.d/ensure-git-0k-access.sh +++ b/.drone.d/update-pre-build.d/ensure-git-0k-access.sh @@ -17,7 +17,25 @@ chmod 600 /root/.ssh/known_hosts cat < /root/.ssh/config Host git.0k.io + ## We'll leverage persistent connection to speed things up + ControlMaster auto + ControlPath ~/.ssh/control/%r@%h:%p + ControlPersist 1m + ServerAliveInterval 20 + HostKeyAlgorithms +ssh-dss User vm-user Port 10022 EOF + +mkdir -p /root/.ssh/control + +cat < /opt/odoo/common/build.d/050-open-ssh +#!/bin/bash + +echo "Checking and opening connection to git.0k.io:" >&2 +ssh -v git.0k.io -- true + +EOF + +chmod +x /opt/odoo/common/build.d/050-open-ssh