First hello everyone.
I use drone for PHP/js builds and deployment. Deployment with deployer, for this I create docker image https://hub.docker.com/r/vertoo/deployer. To deploy I need ssh key from host but I not found any working solution.
Tried few solutions, always I had problem. What is proper way to share host ssh key to docker image in drone?
Found solution:
- name: deploy
image: vertoo/deployer
environment:
SSH_KEY:
from_secret: ssh_key
commands:
- echo "$SSH_KEY" > $HOME/.ssh/id_rsa
- chmod 600 $HOME/.ssh/id_rsa
- /usr/local/bin/dep deploy test
when:
branch:
- master