Skip to content
Snippets Groups Projects

Introduce GCS adapter for remote cache

Merged Tomasz Maczukin requested to merge introduce-gcs-cache-support into master
1 file
+ 16
19
Compare changes
  • Side-by-side
  • Inline
@@ -497,8 +497,7 @@ can be found [here][cronvendor].
## The `[runners.cache]` section
>**Note:**
Added in GitLab Runner v1.1.0.
> Introduced in GitLab Runner 1.1.0.
This defines the distributed cache feature. More details can be found
in the [runners autoscale documentation](autoscale.md#distributed-runners-caching).
@@ -510,14 +509,14 @@ in the [runners autoscale documentation](autoscale.md#distributed-runners-cachin
| `Shared` | boolean | Enables cache sharing between runners, `false` by default. |
CAUTION: **Important:**
With GitLab Runner v11.2.0 configuration parameters related to S3 were moved to a dedicated `[runners.cache.s3]` section.
Old format of the configuration, with S3 configured directly in `[runners.cache]` section is still supported,
but since v11.2.0 is deprecated. **This support will be removed in GitLab Runner v12.0.0**.
With GitLab Runner 11.2.0, the configuration parameters related to S3 were moved to a dedicated `[runners.cache.s3]` section.
The old format of the configuration with S3 configured directly in `[runners.cache]` section is still supported,
but is deprecated with GitLab Runner 11.2.0. **This support will be removed in GitLab Runner 12.0.0**.
### The `[runners.cache.s3]` section
>**Note:**
Moved from `[runners.cache]` section in GitLab Runner v11.2.0
NOTE: **Note:**
Moved from the `[runners.cache]` section in GitLab Runner 11.2.0.
Allows to configure S3 storage for cache. This section contains settings related to S3, that previously were
present globally in the `[runners.cache]` section.
@@ -529,7 +528,7 @@ present globally in the `[runners.cache]` section.
| `SecretKey` | string | The secret key specified for your S3 instance. |
| `BucketName` | string | Name of the storage bucket where cache will be stored. |
| `BucketLocation` | string | Name of S3 region. |
| `Insecure` | boolean | Set to `true` if the S3 service is available by `HTTP`. Is set to `false` by default. |
| `Insecure` | boolean | Set to `true` if the S3 service is available by `HTTP`. Set to `false` by default. |
Example:
@@ -547,31 +546,29 @@ Example:
Insecure = false
```
> **Note:**
For Amazon's S3 service the `ServerAddress` should always be `s3.amazonaws.com`. Minio S3 client will
NOTE: **Note:**
For Amazon's S3 service, the `ServerAddress` should always be `s3.amazonaws.com`. The Minio S3 client will
get bucket metadata and modify the URL to point to the valid region (eg. `s3-eu-west-1.amazonaws.com`) itself.
> **Note:**
If any of `ServerAddress`, `AccessKey` or `SecretKey` aren't specified then the S3 client will use the
NOTE: **Note:**
If any of `ServerAddress`, `AccessKey` or `SecretKey` aren't specified, then the S3 client will use the
IAM instance profile available to the instance.
### The `[runners.cache.gcs]` section
>**Note:**
Introduced in GitLab Runner v11.2.0
> Introduced in GitLab Runner 11.2.0.
Allows to configure native support for Google Cloud Storage
Configure native support for Google Cloud Storage. Read the
[Google Cloud Storage Authentication documentation](https://cloud.google.com/storage/docs/authentication#service_accounts)
to check where these values come from.
| Parameter | Type | Description |
|-------------------|------------------|-------------|
| `CredentialsFile` | string | Path to the Google JSON key file. Currently only `service_account` type is supported. If configured, takes precedence over `AccessID` and `PrivateKey` configured directly in `config.toml` |
| `CredentialsFile` | string | Path to the Google JSON key file. Currently only the `service_account` type is supported. If configured, takes precedence over `AccessID` and `PrivateKey` configured directly in `config.toml`. |
| `AccessID` | string | ID of GCP Service Account used to access the storage. |
| `PrivateKey` | string | Private key used to sign GCS requests. |
| `BucketName` | string | Name of the storage bucket where cache will be stored. |
Please read [Google Cloud Storage Authentication documentation](https://cloud.google.com/storage/docs/authentication#service_accounts)
to check where get these values from.
Examples:
**Credentials configured directly in `config.toml` file:**
Loading