I wanted to make a bug report but before I do that I wanted to ask here, to ensure I have not miss understood how it should work.
It seems that the gitlab-runner helper is removing cache.zip files when it shouldn’t.
My set up is as follows:
I have a gitlab runner (12.1.0) on a windows machine with “Docker desktop community 22.214.171.124”. The runner has the following config.toml:
[[runners]] name = "builder-docker" url = "https://git.***********.net/" token = "**********************" executor = "docker" [runners.custom_build_dir] [runners.docker] tls_verify = false image = "alpine:3.9" privileged = false disable_entrypoint_overwrite = false oom_kill_disable = false disable_cache = false cache_dir = "/cache" volumes = ["/cache"] shm_size = 0 [runners.cache] [runners.cache.s3] [runners.cache.gcs]
My project has the following .gitlab-ci.yml:
cache: key: "sbt-cache" paths: - "sbt-cache/" variables: SBT_OPTS: "-Dsbt.global.base=sbt-cache/.sbtboot -Dsbt.boot.directory=sbt-cache/.boot -Dsbt.ivy.home=sbt-cache/.ivy2 -Dsbt.log.noformat=true" build-publish: image: openjdk:8 script: - ls -al - ./activator $SBT_OPTS compile tags: - docker
All seems fine but when I run my job I see the following lines:
Running with gitlab-runner 12.1.0 (de7731dd) on builder-docker ********** Using Docker executor with image openjdk:8 ... Pulling docker image openjdk:8 ... Using docker image sha256:08ded5f856cc9c3d9ef07d81d06646c35849b9f0359d0a52a8fab6d43cc2cc5d for openjdk:8 ... Running on runner-********-project-60-concurrent-0 via IQIQ-7N9DN3S9UR... Fetching changes... Reinitialized existing Git repository in /builds/web/api-services/.git/ Checking out f38f9381 as testing... Removing "..\\..\\..\\cache\\web\\api-services\\sbt-cache\\cache.zip" Removing .settings/ Removing modules/common/target/ Skipping Git submodules setupChecking cache for sbt-cache... No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted.
Removing "..\\..\\..\\cache\\web\\api-services\\sbt-cache\\cache.zip" seems wrong. Also my test line
- ls -al shows the project has no sbt-cache folder.
Anyone have any ideas about this. Am I missing something?