Skip to content

Instantly share code, notes, and snippets.

@jed204
jed204 / cloudbuild.yaml
Created October 30, 2019 05:36
Google Cloud Build Maven Build with Cache
steps:
# Grab cached M2 repo
- name: gcr.io/cloud-builders/gsutil
id: Get M2 Cache
args: ['cp', 'gs://BUCKET_NAME/m2.tar.gz', 'm2.tar.gz']
# See https://github.com/GoogleCloudPlatform/cloud-builders-community to get the tar command
- name: gcr.io/PROJECT_ID/tar
id: Expand M2 Cache
args: ['xpzf', 'm2.tar.gz']
# Optional, we had some extra settings to include