GCS shared cache runner on Kubernetes is not used

I use GKE to hosted my own gitlab runner linked to GitLab.com. I use GCS environment variable to set GCS cache parameter. When using a "specific runner" on my own gitlab runner hosted on Google Kubernetes Engine, the specific runner can't use cache.

The following log is output at the beginning of the build:

Checking cache for mycache...
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted. 
Successfully extracted cache

Here is gcs environement variables used :

  • CACHE_TYPE=gcs
  • CACHE_PATH="gitlab-runner"
  • CACHE_SHARED=true
  • CACHE_GCS_ACCESS_ID="@.iam.gserviceaccount.com"
  • CACHE_GCS_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n-----END PRIVATE KEY-----\n"
  • CACHE_GCS_BUCKET_NAME="mybucket"

How I use gcs shared cache with gitlab runner ?

FYI: I use kubernetes executor

Edited Oct 02, 2019 by Michel Debaut
Assignee Loading
Time tracking Loading