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 = [ './', ],