I'm working on a gitlab pipeline that among the other things should work with some file located in another gitlab repo. For now I do it like this:
script:
- git clone https://gitlab-ci-token:${TOKEN}@${repo}.git
- cd repository
- git checkout desired-branch
- cd desired/folder
#then perform the desired operations like:
- ls
Also if the previous code works it seems to me a waste of resources to clone every time the whole repo including all the folders, all the commits and all the branches when I'm just interested on a simple folder.
Is there a specific gitlab command that allows me to just download the desired files?
For example:
script:
- git download https://gitlab-ci-token:${TOKEN}@${repo}.git --f="desired-folder" --b="desired-branch"
- ls