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

steps:
- name: 'gcr.io/cloud-builders/docker'
  args:
  - 'build'
  - '--build-arg=BASE_IMAGE=gcr.io/cloud-builders/javac:8'
  - '--build-arg=SBT_VERSION=1.9.6'
  - '--build-arg=SHA=8daa26edc8e2f862397282807f317fc4d71a0334cee736305d370ba6976737f7'
  - '--tag=gcr.io/$PROJECT_ID/scala-sbt:1.9.6-jdk-8'
  - '.'
  waitFor: ['-']

# Tag the default 'latest' version
- name: 'gcr.io/cloud-builders/docker'
  args:
  - 'tag'
  - 'gcr.io/$PROJECT_ID/scala-sbt:1.9.6-jdk-8'
  - 'gcr.io/$PROJECT_ID/scala-sbt'

images:
- 'gcr.io/$PROJECT_ID/scala-sbt'
- 'gcr.io/$PROJECT_ID/scala-sbt:1.9.6-jdk-8'
tags: ['cloud-builders-community']
