# In this directory, run the following command to build this builder.
# $ gcloud container builds submit . --config=cloudbuild.yaml

# See Rocker documentation at https://github.com/grammarly/rocker

steps:
# TODO: use the standard go builder.
#- name: 'gcr.io/cloud-builders/go:debian'
# Build rocker.
- name: 'gcr.io/bendory-argo/go:debian'
  args: ['get', 'github.com/grammarly/rocker']
  env: ['GOPATH=.', 'GO15VENDOREXPERIMENT=1']
# Package it into a docker image.
- name: 'gcr.io/cloud-builders/docker'
  args: ['build', '-t', 'gcr.io/$PROJECT_ID/rocker', '.']
# Test the rocker build step that we just built.
- name: 'gcr.io/$PROJECT_ID/rocker'
  args: ['--version']
# Use Rockerfile to Build the image 'rocker-built-rocker'.
- name: 'gcr.io/$PROJECT_ID/rocker'
  args: ['build', '-f', 'Rockerfile', '.']
# Confirm that rocker successfully built rocker-built-rocker.
- name: 'rocker-built-rocker'
  args: ['--version']

# Push the rocker builder image.
images:
- 'gcr.io/$PROJECT_ID/rocker'

# In this directory, run the following command to build this builder.
# $ gcloud container builds submit . --config=cloudbuild.yaml

# See Rocker documentation at https://github.com/grammarly/rocker

steps:
# Build rocker.
- name: 'gcr.io/cloud-builders/go:debian'
  args: ['get', 'github.com/grammarly/rocker']
  env: ['GOPATH=.', 'GO15VENDOREXPERIMENT=1']
# Package it into a docker image.
- name: 'gcr.io/cloud-builders/docker'
  args: ['build', '-t', 'gcr.io/$PROJECT_ID/rocker', '.']
# Test the rocker build step that we just built.
- name: 'gcr.io/$PROJECT_ID/rocker'
  args: ['--version']
# Use Rockerfile to Build the image 'rocker-built-rocker'.
- name: 'gcr.io/$PROJECT_ID/rocker'
  args: ['build', '-f', 'Rockerfile', '.']
# Confirm that rocker successfully built rocker-built-rocker.
- name: 'rocker-built-rocker'
  args: ['--version']

# Push the rocker builder image.
images:
- 'gcr.io/$PROJECT_ID/rocker'

Use the cloud-builders go builder.
Use the cloud-builders go builder.