Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (37 sloc) 1.52 KB
# To run the build locally, install cloud-build-local first.
# See:
# Then run:
# cloud-build-local --config=cloudbuild-proxy.yaml --dryrun=false --substitutions TAG_NAME=[TAG] .
# This will create a docker image named[PROJECT_ID]/proxy:[TAG] locally.
# The PROJECT_ID is the current project name that gcloud uses.
# You can add "--push true" to have the image pushed to GCR.
# To manually trigger a build on GCB, run:
# gcloud builds submit --config cloudbuild-proxy.yaml --substitutions TAG_NAME=[TAG] .
# To trigger a build automatically, follow the instructions below and add a trigger:
# Set permissions correctly. Not sure why it is necessary, but it is.
- name: 'alpine'
args: ['chown', '-R', 'root:root', '.']
- name: 'alpine'
args: ['chmod', '-R', '777', '.']
# Clone the private repo merge its contents.
- name: ''
args: ['source', 'repos', 'clone', 'nomulus-config']
- name: 'alpine'
args: ['sh', '-c', 'cp -r nomulus-config/* .']
# Build the deploy jar.
- name: 'openjdk:8-slim'
args: ['./gradlew', ':proxy:deployJar', '-x', 'autoLintGradle']
dir: 'gradle'
# Build the docker image.
- name: ''
args: ['build', '--tag', '${PROJECT_ID}/proxy:${TAG_NAME}', '.']
dir: 'gradle/proxy'
# Images to upload to GCR.
images: ['${PROJECT_ID}/proxy:${TAG_NAME}']
timeout: 3600s
machineType: 'N1_HIGHCPU_8'