timeout: 1800s  # Wait for 30 minutes for the whole process to finish.
options:
  diskSizeGb: 100
  machineType: 'N1_HIGHCPU_8'

steps:
# Start the version so that it is ready to receive traffic
- name: 'gcr.io/cloud-builders/gcloud'
  dir: 'perf_issue_service'
  args: [
    app, versions, 'start', '-s', 'perf-issue-service', '${_SERVICE_VERSION}'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  id: 'Set traffic for perf_issue_service service'
  dir: 'perf_issue_service'
  args: [
    'app', 'services', 'set-traffic', 'perf-issue-service',
    '--splits=${_SERVICE_VERSION}=1'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  entrypoint: '/bin/bash'
  args: [
    '-x', '-e', 'dashboard/dev_dockerfiles/stop_old_versions.sh',
    'perf-issue-service'
  ]
substitutions:
    _SERVICE_VERSION: 'cloud-build-1359250'
