Distributed caching not working with docker+machine executor
Summary
I'm trying to make the distributed caching work with a Gitlab docker+machine runner, hosted on a Google Compute instance, and none of the files in /cache
get stored in the distributed Minio-based cache. So I believe either the provided documentation is wrong or incomplete, either there's a problem with the caching when using the docker+machine executor.
System setup
I've got the following setup, based on Google Compute:
- 1 instance hosting the Gitlab Runner, using a docker+machine executor
- 1 instance hosting a running Minio container, setup exactly like in the documentation
Steps to reproduce
- start an Android build that places the gradle cache in the
/cache
directory in the build docker - wait for the build to finish successfully
- check the
/export/runner
directory on the Cache machine
Actual behavior
-
/export/runner
on the Cache machine is empty - all builds start with an empty
/cache
directory
Expected behavior
-
/export/runner
on the Cache machine contains Gradle dependencies from previous builds - builds start with an non-empty
/cache
directory
Environment description
-
1 x micro machine with Debian for Gitlab Runer
-
1 x micro machine with Debian for Minio Cache
-
n x standard machines for builds (via
docker+machine
and thegoogle
driver) -
Running with Gitlab Runner 1.10.1 (1039add)
-
Docker version: 1.12.5
-
Docker-machine version 0.8.2, build e18a919
Gitlab Runner config.toml
concurrent = 3
check_interval = 0
[[runners]]
name = "docker-runner"
token = "{XYZ}"
executor = "docker+machine"
limit = 3
[runners.docker]
tls_verify = false
privileged = false
volumes = ["/cache"]
[runners.cache]
Type = "s3"
ServerAddress = "10.240.0.60:9005"
AccessKey = "{XYZ}"
SecretKey = "{XYZ}/{XYZ}"
BucketName = "runner"
Insecure = true
BucketLocation = "us-east-1"
[runners.machine]
IdleCount = 0
IdleTime = 3600
OffPeakPeriods = [
"* * 0-8,18-23 * * mon-fri *",
"* * * * * sat,sun *"
]
OffPeakIdleCount = 0
OffPeakIdleTime = 900
MachineDriver = "google"
MachineName = "auto-scale-instance-%s"
MachineOptions= [
"google-project={XYZ}",
"google-machine-image=https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-8",
"google-zone=europe-west1-d",
"google-machine-type=n1-standard-1",
"google-disk-size=20",
"google-disk-type=pd-ssd"
]