I’m trying to deploy to a python app to an EC2 server by executing a deployment script via ssh like so:
deployment:
master:
branch: master
commands:
- source ./environment_variables.sh && \
/usr/bin/ssh -i /home/ubuntu/.ssh/id_production ubuntu@$SSH_HOST "/var/www/mls_api/atomic_deployments.sh"
But the ssh command doesn’t seem to be installed. I get this error:
bash: line 1: ssh: command not found
At first I thought this might be an issue related to virtualenv, but using /usr/bin/ssh returns the same error. Is deploying this way possible?
Edit: The culprit turned out to be the \ after the &&. Apparently, CircleCI doesn’t share that convention with bash.