Reputation: 41
I have a problem, how could I cache multiple directories in gitlab ci? When Gitlab-runner download the repository, inside I have like 10 folders (diferent projects), some project depeneds of another, so I would like do it available for the next jobs.
I thought do it something like that, without specifying all folders manually
cache:
paths:
- "./"
Could be work this or I need something else?
Thanks in advance
Upvotes: 0
Views: 1383
Reputation: 88
If what you want is to cache all the untracked files and directories of the repository, yo can use untracked:true
job_name:
script: test
cache:
untracked: true
You can also combine this with the path
keyword like this:
rspec:
script: test
cache:
untracked: true
paths:
- your_path/
You may use wildcards for the paths too like your_path/*.jar
to take every .jar
file in the directory.
I point you to the official GitLab documentation for more info: GitLab-CI documentation
Upvotes: 2