From 7b81b6734be5c16dd77bc772eb975409fa07b9b4 Mon Sep 17 00:00:00 2001 From: Rick Altherr Date: Mon, 5 Feb 2018 17:51:37 -0800 Subject: [PATCH] Google Cloud Builder configuration for database generation Signed-off-by: Rick Altherr --- .gcloudignore | 15 +++++++++++++++ cloudbuild.yaml | 21 +++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .gcloudignore create mode 100644 cloudbuild.yaml diff --git a/.gcloudignore b/.gcloudignore new file mode 100644 index 00000000..ef2ea2e4 --- /dev/null +++ b/.gcloudignore @@ -0,0 +1,15 @@ +# This file specifies files that are *not* uploaded to Google Cloud Platform +# using gcloud. It follows the same syntax as .gitignore, with the addition of +# "#!include" directives (which insert the entries of the given .gitignore-style +# file at that point). +# +# For more information, run: +# $ gcloud topic gcloudignore +# +.gcloudignore +#!include:.gitignore + +# Don't bother uploading files not needed to generate a database. +experiments +minitests +vagrant diff --git a/cloudbuild.yaml b/cloudbuild.yaml new file mode 100644 index 00000000..c3f12bcc --- /dev/null +++ b/cloudbuild.yaml @@ -0,0 +1,21 @@ +steps: +- name: 'gcr.io/cloud-builders/docker' + args: + - 'build' + - '--build-arg' + - 'DEV_ENV_IMAGE=${_DEV_ENV_IMAGE}' + - '--build-arg' + - 'NUM_PARALLEL_JOBS=${_NUM_CPUS}' + - '-t' + - '${_GCR_ZONE}/$PROJECT_ID/${_IMAGE_NAME}:${TAG_NAME}' + - '.' +options: + disk_size_gb: 1000 + machine_type: N1_HIGHCPU_32 +timeout: '21600s' +substitutions: + _GCR_ZONE: 'gcr.io' + _IMAGE_NAME: 'prjxray-db' + _NUM_CPUS: '16' +images: + - '${_GCR_ZONE}/$PROJECT_ID/${_IMAGE_NAME}:${TAG_NAME}'