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

steps:
- name: 'gcr.io/cloud-builders/docker'
  args: ['build', '--tag=gcr.io/$PROJECT_ID/git', '.']

# Clone a public repo and write its revision to a VERSION file.
- name: 'gcr.io/$PROJECT_ID/git'
  args: ['clone', 'https://github.com/GoogleCloudPlatform/cloud-builders.git']
  dir: 'examples/version-file'
# The Dockerfile here uses this git builder as its base image.
- name: 'gcr.io/cloud-builders/docker'
  args: ['build', '--tag=version_file', '.']
  dir: 'examples/version-file'
- name: 'version_file'
  args: ['VERSION']
  dir: 'examples/version-file/cloud-builders'
# Prove that the file exists.
- name: 'alpine'
  args: ['ash', '-c', 'echo "Version: $(cat VERSION)"']
  dir: 'examples/version-file/cloud-builders'

# Clone a private repo belonging to the project.
- name: 'gcr.io/$PROJECT_ID/git'
  args: ['clone', 'https://source.developers.google.com/p/$PROJECT_ID/r/default']

images: ['gcr.io/$PROJECT_ID/git']

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

steps:
- name: 'gcr.io/cloud-builders/docker'
  args: ['build', '--tag=gcr.io/$PROJECT_ID/git', '.']

# Clone a public repo and write its revision to a VERSION file.
- name: 'gcr.io/$PROJECT_ID/git'
  args: ['clone', 'https://github.com/GoogleCloudPlatform/cloud-builders.git']
  dir: 'examples/version-file'
# The Dockerfile here uses this git builder as its base image.
- name: 'gcr.io/cloud-builders/docker'
  args: ['build', '--tag=version_file', '.']
  dir: 'examples/version-file'
- name: 'version_file'
  args: ['VERSION']
  dir: 'examples/version-file/cloud-builders'
# Prove that the file exists.
- name: 'alpine'
  args: ['ash', '-c', 'echo "Version: $(cat VERSION)"']
  dir: 'examples/version-file/cloud-builders'

images: ['gcr.io/$PROJECT_ID/git']

Remove a sample that breaks our release
Remove a sample that breaks our release

-------------
MOE_MIGRATED_REVID=139902326
APPROVED=philmod@google.com
