timeout: 1800s  # Wait for 30 minutes for the whole process to finish.
options:
  diskSizeGb: 100
  machineType: 'N1_HIGHCPU_8'
steps:
- name: 'gcr.io/cloud-builders/gcloud'
  id: 'Deploy perf-issue-service'
  dir: 'perf_issue_service'
  args: [
    app, deploy, '--no-promote', '--version', 'cloud-build-${SHORT_SHA}',
    app.yaml,
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  id: 'Stop the newly deployed instances'
  dir: 'perf_issue_service'
  args: [
    app, versions, 'stop', '-s', 'perf-issue-service', 'cloud-build-${SHORT_SHA}'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  entrypoint: '/bin/bash'
  args: [
    '-x', '-e', 'dashboard/dev_dockerfiles/cleanup_versions.sh',
    '21', 'perf-issue-service'
  ]
