Pipeline Job is not using Cache
Hi there, I am quite new to GitLab & Ci-Pipelines, so I hope this is not misplaced.
I am running an Angular-App and want to speed up the pipeline by uploading the node_modules into the cache, so they are not downloaded from NPM with every pipeline run (completely).
The stage looks like this ..
angular-build:
stage: build
image: trion/ng-cli
script:
- npm install
- ng build
cache:
key: angular-build-cache
paths:
- $CI_PROJECT_DIR/node_modules/**/*
artifacts:
expire_in: 2h30min
paths:
- Frontend/dist/
tags:
- build
.. and passes "with success" on a Runner with the following config (see below).
The Runner itself is located on an UBUNTU vServer and neither on S3 nor on GCS
Nevertheless, when uploading the cache, the following error is displayed:
Creating cache angular-build-cache-4...
*resolved_$CI_PROJECT_DIR_Path*/node_modules/**/*: found 54969 matching files
No URL provided, cache will be not uploaded to shared cache server. Cache will be stored only locally.
Created cache
I guess, I already followed the GitLab guideline. That the cache is stored locally is ok - but no speed up is recognized. At least the modules are downloaded over and over.
If I got it right form the documentation, the 'magic line' is ..
Shared = true
.. in the [runners.cache] space, to make it available from one pipeline to another.
Just to be safe - here is the runner form the config.toml:
[[runners]]
name = "aaa"
url = "https://git.bbb.com/"
token = "cccCCCccc"
executor = "docker"
[runners.custom_build_dir]
[runners.docker]
tls_verify = false
image = "alpine:latest"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0
[runners.cache]
Path = "*resolved_$CI_PROJECT_DIR_Path*/node_modules/**/*"
Shared = true
[runners.cache.s3]
[runners.cache.gcs]
- Did I miss something?
- Why the runner not uploading the cache properly?
- Is this feature only available for Amazon S3 and Google GCS?