steps:
- name: 'gcr.io/cloud-builders/docker'
  args:
    - 'build'
    - '--tag=${_SERVER_IMAGE_NAME}:${COMMIT_SHA}'
    - '--tag=${_SERVER_IMAGE_NAME}:${BRANCH_NAME}'
    - '--file=test-server.Dockerfile'
    - '.'

- name: 'gcr.io/cloud-builders/docker'
  args:
    - 'build'
    - '--tag=${_CLIENT_IMAGE_NAME}:${COMMIT_SHA}'
    - '--tag=${_CLIENT_IMAGE_NAME}:${BRANCH_NAME}'
    - '--file=test-client.Dockerfile'
    - '.'

substitutions:
  _SERVER_IMAGE_NAME: us-docker.pkg.dev/grpc-testing/psm-interop/java-server
  _CLIENT_IMAGE_NAME: us-docker.pkg.dev/grpc-testing/psm-interop/java-client

images:
  - '${_SERVER_IMAGE_NAME}:${COMMIT_SHA}'
  - '${_SERVER_IMAGE_NAME}:${BRANCH_NAME}'
  - '${_CLIENT_IMAGE_NAME}:${COMMIT_SHA}'
  - '${_CLIENT_IMAGE_NAME}:${BRANCH_NAME}'
