gradle-build-cache

by EugenMayer

Helm chartv0.2.0App 21.2.2

Hosts the official gradle build cache node

About this chart

WAT

Lets you host the official gradle build cache on your k8s cluster - uses the official docker container by the Gradle team and wraps it in a simple chart.

Config

If you want to provide your config (which you most probably will do in prodduction), you need to deploy a k8s secret that includes a key config.yaml, holding the entire/vanilla gradle-build-cache configuration-yaml as a base64 encoded string. See the (official docs)(https://docs.gradle.com/build-cache-node/#editing_the_file). You will then need to enable it in the persistence.config-secret, and if you used a custom name, override objectName

persistence:
  config-secret:
    enabled: true
    objectName: 'gradle-cache-config'

Persistence

By default, the cache data is persistent, see persistence in values.yml

Values

Check the values.yml file

Credits

All the credits to gradles build cache doing the actual work.

Deploy gradle-build-cache with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has gradle-build-cache on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartgradle-build-cache is pinned at v0.2.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply