From afc7c139a9cdd814c78fe91f469f76fe52ce4225 Mon Sep 17 00:00:00 2001 From: sbasile-ch Date: Fri, 27 Jan 2023 18:41:14 +0000 Subject: [PATCH] update ssh in Tiltfile as specified by https://github.com/companieshouse/docker-chs-development/pull/581 --- Tiltfile.dev | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tiltfile.dev b/Tiltfile.dev index 258d4e3..6a83e74 100644 --- a/Tiltfile.dev +++ b/Tiltfile.dev @@ -1,6 +1,7 @@ custom_build( ref = '169942020521.dkr.ecr.eu-west-1.amazonaws.com/local/payments.api.ch.gov.uk', - command = 'DOCKER_BUILDKIT=0 docker build --build-arg SSH_PRIVATE_KEY="$(cat ~/.ssh/id_rsa)" --build-arg SSH_PRIVATE_KEY_PASSPHRASE --tag $EXPECTED_REF .', + #the following build-command was updated as specified by https://github.com/companieshouse/docker-chs-development/pull/581 + command = 'DOCKER_BUILDKIT=0 docker build --build-arg SSH_PRIVATE_KEY="$(ssh_key_path="$(ssh -G github.com | grep -e \'^identityfile.*\' | head -n1 | sed \'s|^identityfile \\(.*\\)|\\1|\')"; if [ -z "${ssh_key_path}" ]; then echo "Could not find ssh key path for github.com">&2; false; elif [ -f "${ssh_key_path}" ]; then cat "${ssh_key_path}"; else echo "Could not find ssh key for github at ${ssh_key_path}" >&2; false; fi)" --build-arg SSH_PRIVATE_KEY_PASSPHRASE --tag $EXPECTED_REF .', deps = [ './', ],