after that I’m open directory with cache and see
directory have name, like as: branch_name-fa83b4ca-2
at this situation I’m can’t undestend where are from this “2”?
2 - thisis not a comit part, couse if set only $CI_COMMIT_BRANCH - name directory was branch_name-2
Hi @vic
the -2 suffix is a cache “version” and is added automatically by GitLab. Cache starts with no suffix, then after first time someone clicks on the “Clear runner caches” in Pipeline UI (or use other means to clear runner cache) the suffix -1 is appended. After every runner cache clear the number is incremented.
“Clear runner caches” does not actually delete anything from cache storage. The previous versions are kept there and the suffix is added/incremented to differentiate between them.
I do not know anything about the user function “Clear runner caches” in user interfaces. Only like as function of pipeline.
At this pipeline I’m don’t use cleanup and any people can’t use this job ore cache.
This directory create after first step of this pipeline
Can you help me … where (how) I can set full log of any functions of some pipelene? Where I can find, who change this index?
that is not a problem
I’m can’t understend this situation where are from this “2”
At the same time this situation don’t destroy my pipeline. For other pipeline in cache key I’m added type of job (build,test,deploy…) and needs and dependence. At now - all pipelines may be runned at the same time and in runner I can set any value for “concurrent”.
I am sorry, but I don’t understand what are you trying to achieve. GitLab Runner cache is transparent to jobs and there is no need to specify or use any directory in /cache.
I’m have multisystem project with many moduls on one branch. From the complect of moduls developers collect build. On the main pipeline I’m see many modules, If some developers will (they do it everyday) create multibuild - if cache will constat, thy will push in smame directory of cache - this about tranperent cache %)
system has this parts of build:
test-build-deply-arch-assembling
branch_a {build} >> cache.zip of project_1 (cache1)
after
branch_b {build} >> cache.zip of project_2 (cache2)
if i’m set names from static_names - they will push in the same directory, and after this I will have:
branch_a {deploy} << cache.zip of project_2
this one of problem what was find
and now, if I’m cand undestend “what is a {…}?” And I’m can’t understand from what someone … I’m try tu undestend.
and now with the cache key (cache key - this is name for directory, where cache are stored) I’m use $branch-$commit-$step-$project
and if i look in directory with cache, I’m see:
$branch-$commit-$step-$project-2
and now I’m try to understand … source of this “2” :-/
I have already explained to you where the -2 suffix comes from. It’s added by GitLab automatically and there is nothing you can do about it. There is no option to change or disable it.
Now I understand that your problem is that jobs from different modules in your repository overwrite cache. This is expected behavior and explained in the documentation. It is also noted there that cache is not designed to transfer files between jobs. That’s what artifacts is for. If you need separate cache for each module you must use unique cache.key in each module’s jobs. Something like $CI_COMMIT_BRANCH-$CI_COMMIT_SHORT_SHA-module1
I still don’t understand, why are you concerned with names of the directories in cache. That’s internal GitLab Runner directory which should not be accessed or manipulated by anything else.
names of directorys - I’m need to undestand all elemets of mechanics work GitLab for understand “how it works”.
about “2” - if I set static names of directories, what creating on runners - “2” dont added to name of directories. Only static names. And creation only “2” for pipeline have any quantity of stages.
cache - why cache we cant use for move result of stages between stages (for up speed of works)? In manual for gitlab writes about cache and artifacts. I can use artifacs, but cache can optimizatet speed.
alot of thanks for your answer and your time for answer