If you use cache and artifacts to store the same path in your jobs, the cache mightīe overwritten because caches are restored before artifacts. Docker Machine (autoscale runners) The same as the Docker executor. Docker Locally, under Docker volumes: /var/lib/docker/volumes//_data////cache.zip. Runner executor Default path of the cache Shell Locally, under the gitlab-runner user’s home directory: /home/gitlab-runner/cache////cache.zip. The location also depends on the type of executor. Is stored on the machine where GitLab Runner is installed. The runner configuration defines where the file is stored. Where the caches are storedĪll caches defined for a job are archived in a single cache.zip file. Whether different runners are used to pass the cache between jobs.The availability of the cache depends on: To regenerate cached files in each job that needs them.Īfter you define a cache in. v -short Availability of the cacheĬaching is an optimization, but it isn’t guaranteed to always work. go/pkg/mod/ test : image : golang:1.13 extends. go-cache : variables : GOPATH : $CI_PROJECT_DIR/.go before_script : - mkdir -p. Per-cache fallback keys are appended with -protected or -non_protected. If the Use separate caches for protected branches setting is enabled,.If you clear caches manually, per-cache fallback keys are appended.If none are found, the job downloads all the Ruby dependencies without using a cache,īut creates a new cache for cache-$CI_COMMIT_REF_SLUG when the job completes.įallback keys follow the same processing logic as cache:key:.If cache-$CI_DEFAULT_BRANCH is also not found, the job looks for cache-default.If cache-$CI_COMMIT_REF_SLUG is not found, the job looks for cache-$CI_DEFAULT_BRANCH.The job looks for the cache-$CI_COMMIT_REF_SLUG cache.Test-job : stage : build cache : - key : cache-$CI_COMMIT_REF_SLUG fallback_keys : - cache-$CI_DEFAULT_BRANCH - cache-default paths : - vendor/ruby script : - bundle config set -local path 'vendor/ruby' - bundle install - echo Run tests. This directory should use NFS or something similar. Share a common network-mounted directory to store the cache. Use multiple runners with the same architecture and have these runners.You can configure a different cache for each branch.įor runners to work with caches efficiently, you must do one of the following: ![]() Use runners that are only available to a particular project.Tag your runners and use the tag on jobs.To ensure maximum availability of the cache, do one or more of the following: Use dependencies to control which jobs fetch the artifacts.The latest artifacts do not expire if keep latest artifacts is enabled.Artifacts expire after 30 days by default.Different projects cannot share artifacts.Subsequent jobs in later stages of the same pipeline can use artifacts.By default, protected and non-protected branches do not share the cache.Different projects cannot share the cache. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |