steps:
  - name: 'gcr.io/cloud-builders/docker'
    args: ['build', '-f', 'docker/test/Dockerfile', '-t', 'redissample_test:latest', '.']
  - name: 'gcr.io/cloud-builders/docker'
    args: ['run', '-v', '/workspace:/redissample', 'redissample_test:latest']
  - name: 'gcr.io/cloud-builders/docker'
    args: ['build', '-f', 'docker/prebuild/Dockerfile', '-t', 'redissample_prebuild:latest', '.']
  - name: 'gcr.io/cloud-builders/docker'
    args: ['run', '-v', '/workspace:/redissample', 'redissample_prebuild:latest']
  - name: 'gcr.io/cloud-builders/docker'
    args: ['build', '-t', 'asia.gcr.io/harai-kube-sandbox/redissample', '.']
images: ['asia.gcr.io/harai-kube-sandbox/redissample']

steps:
  - name: 'gcr.io/cloud-builders/docker'
    args: ['build', '-f', 'docker/test/Dockerfile', '-t', 'redissample_test:latest', '.']
  - name: 'gcr.io/cloud-builders/docker'
    args: ['run', '-v', '/workspace:/redissample', '-d', '--name', 'redissample-test', 'redissample_test:latest', '/bin/bash', 'infinity']
  - name: 'gcr.io/cloud-builders/docker'
    args: ['exec', 'redissample-test', 'python', 'test/test_app.py']
  - name: 'gcr.io/cloud-builders/docker'
    args: ['build', '-f', 'docker/prebuild/Dockerfile', '-t', 'redissample_prebuild:latest', '.']
  - name: 'gcr.io/cloud-builders/docker'
    args: ['run', '-v', '/workspace:/redissample', 'redissample_prebuild:latest']
  - name: 'gcr.io/cloud-builders/docker'
    args: ['build', '-t', 'asia.gcr.io/harai-kube-sandbox/redissample', '.']
images: ['asia.gcr.io/harai-kube-sandbox/redissample']

Detach to allow flexible tests
Detach to allow flexible tests
