-
Hey guys, I love using tart as it helps me to focus elsewhere then to dealing with environment stuff on our CI 👏 Nevertheless I've run to use case I would love to discuss - our images for our Gitlab CI (that uses Tart Gitlab Executor) are public and we would love to keep them public, although to access some of our private code, we need to provide it with some SSH keys, so cloning it is possible. Back when our runners weren't ephemeral, we just added private key in I came up with 2 variants (feel free to add some more):
I don't like 1. as this means that every job needs to move the file from env var to Using 2. seems a bit better to me, just looks a bit tricky as AFAIK this is not actually possible and directories from host are mounted under And this brings me to the original question - would it be possible to mount Thanks in advance 🙂 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Or maybe 3rd option - customize the custom executor, that would use |
Beta Was this translation helpful? Give feedback.
-
It seem the idiomatic way will be to follow recommendations for Docker GitLab Executor:
before_script:
- mkdir -p ~/.ssh
- chmod 400 "$SSH_PRIVATE_KEY"
- ssh-add "$SSH_PRIVATE_KEY" As for the moving mounting outside of But in either cases you will also need to modify your CI config so I'd suggest investigate the idiomatic way. Having a variable instead of always mounting the secrets also sounds like a more secure option IMO. |
Beta Was this translation helpful? Give feedback.
Unfortunately, it's a current limitation. 😪 A virtual machine has only one
virtio
file system so it can only be mounted at one location inside the virtual machine. An automation or scripts will need to take care of symlinking or re-mounting the directories.