---
# See https://cloud.google.com/cloud-build/docs/build-config
timeout: 1200s
options:
  substitution_option: ALLOW_LOOSE
steps:
  - name: gcr.io/cloud-builders/docker
    dir: ./images/releng/ci
    args:
      - build
      - --tag=$_REGISTRY/releng-ci:$_GIT_TAG
      - --tag=$_REGISTRY/releng-ci:$_IMAGE_VERSION
      - --tag=$_REGISTRY/releng-ci:latest
      - --build-arg=GO_VERSION=${_GO_VERSION}
      - .
  - name: gcr.io/gcp-runtimes/container-structure-test
    dir: ./images/releng/ci
    args:
      - test
      - --image=$_REGISTRY/releng-ci:latest
      - --config=test.yaml
substitutions:
  # _GIT_TAG will be filled with a git-based tag for the image, of the form
  # vYYYYMMDD-hash, and can be used as a substitution
  _GIT_TAG: '12345'
  _PULL_BASE_REF: 'dev'
  _IMAGE_VERSION: 'v0.5.1'
  _GO_VERSION: '1.16.3'
  _REGISTRY: 'fake.repository/registry-name'
images:
  - 'gcr.io/$PROJECT_ID/releng-ci:${_GIT_TAG}'
  - 'gcr.io/$PROJECT_ID/releng-ci:${_IMAGE_VERSION}'
  - 'gcr.io/$PROJECT_ID/releng-ci:latest'

tags:
- 'releng-ci'

---
# See https://cloud.google.com/cloud-build/docs/build-config
timeout: 1200s
options:
  substitution_option: ALLOW_LOOSE
steps:
  - name: gcr.io/cloud-builders/docker
    dir: ./images/releng/ci
    args:
      - build
      - --tag=$_REGISTRY/releng-ci:$_GIT_TAG
      - --tag=$_REGISTRY/releng-ci:$_IMAGE_VERSION
      - --tag=$_REGISTRY/releng-ci:latest
      - --build-arg=GO_VERSION=${_GO_VERSION}
      - .
  - name: gcr.io/gcp-runtimes/container-structure-test
    dir: ./images/releng/ci
    args:
      - test
      - --image=$_REGISTRY/releng-ci:latest
      - --config=test.yaml
substitutions:
  # _GIT_TAG will be filled with a git-based tag for the image, of the form
  # vYYYYMMDD-hash, and can be used as a substitution
  _GIT_TAG: '12345'
  _PULL_BASE_REF: 'dev'
  _IMAGE_VERSION: 'v0.5.2'
  _GO_VERSION: '1.16.4'
  _REGISTRY: 'fake.repository/registry-name'
images:
  - 'gcr.io/$PROJECT_ID/releng-ci:${_GIT_TAG}'
  - 'gcr.io/$PROJECT_ID/releng-ci:${_IMAGE_VERSION}'
  - 'gcr.io/$PROJECT_ID/releng-ci:latest'

tags:
- 'releng-ci'

Build v0.5.2 image using go1.16.4
releng-ci: Build v0.5.2 image using go1.16.4

Signed-off-by: Stephen Augustus <0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33@auggie.dev>
