Access project deploy keys from CI build
Description
Let's say we have a (web)server host
which should be able to read a project foo
from a (private) GitLab instance. So we add a SSH key from that server as a deploy key to that project. Fine.
Not let's assume we have a Gitlab-CI build script which builds the project and eventually also deploys it to server host
. All I can find about this scenario are these docs here https://docs.gitlab.com/ce/ci/ssh_keys/README.html which say, we need to add the SSH key from host
again to the project foo
– this time as a secret build variable.
Am I right or missing something?
Proposal
The GitLab-CI build process should be able to access the projects deploy keys by default to be able to access those servers...