<commit_before># These are the testing and deploy steps for the performance dashboard
# services. We re-use the docker-compose files in the dev_dockerfiles directory
# to ensure we're runing the same test and deploy cycle everytime.
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/docker'
  entrypoint: 'bash'
  args:
  - '-c'
  - |
    docker pull gcr.io/$PROJECT_ID/dashboard-base:latest || exit 0
- name: 'gcr.io/cloud-builders/docker'
  dir: 'dashboard/dev_dockerfiles'
  args: [
    'build',
    '-t', 'dashboard-base:latest',
    '-t', 'gcr.io/$PROJECT_ID/dashboard-base:latest',
    '--cache-from', 'gcr.io/$PROJECT_ID/dashboard-base:latest',
    '.'
  ]
- name: 'gcr.io/$PROJECT_ID/docker-compose'
  dir: 'dashboard/dev_dockerfiles'
  args: [
    'run', 'python-unittest-dashboard-py3'
  ]
# We need to provide the auth token that the service account is using to the
# container from which we're going to deploy the Dashboard services.
- name: 'gcr.io/$PROJECT_ID/docker-compose'
  dir: 'dashboard/dev_dockerfiles'
  args: [
    'run', 'cloudbuild-prepare-deployment-py3'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  entrypoint: '/bin/bash'
  args: [
      '-x', '-e', 'dashboard/dev_dockerfiles/cleanup_versions.sh',
      'api', 'default', 'pinpoint', 'upload-processing', 'upload'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  dir: 'deploy-dashboard'
  args: [
    app, deploy, '--no-promote', '--version', 'cloud-build-${SHORT_SHA}-py3',
    # We enumerate the files we need to deploy just for the dashboard.
    # TODO(dberris): Figure out how we can include cron.yaml and dispatch.yaml
    # from this automation. This fails in production with the service account
    # used by cloud-build, so we've left it out for now.
    # TODO(wenbinzhang): deploy other services when migration to python3 is done.
    # api.yaml,
    # app.yaml,
    # upload-processing.yaml,
    # upload.yaml,
    pinpoint-py3.yaml,
  ]
# We check in the target versions to avoid unintended traffic changes.
- name: 'gcr.io/cloud-builders/gcloud'
  id: 'Set traffic for default service'
  dir: 'deploy-dashboard'
  args: [
    'app', 'services', 'set-traffic', 'default',
    '--splits=cloud-build-aa7c33e=.7,cloud-build-3413510=.3'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  id: 'Set traffic for api service'
  dir: 'deploy-dashboard'
  args: [
    'app', 'services', 'set-traffic', 'api',
    '--splits=cloud-build-aa7c33e=.7,cloud-build-3413510=.3'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  id: 'Set traffic for upload service'
  dir: 'deploy-dashboard'
  args: [
    'app', 'services', 'set-traffic', 'upload',
    '--splits=cloud-build-aa7c33e=.7,cloud-build-07a32de=.3'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  id: 'Set traffic for upload-processing service'
  dir: 'deploy-dashboard'
  args: [
    'app', 'services', 'set-traffic', 'upload-processing',
    '--splits=cloud-build-aa7c33e=.7,cloud-build-07a32de=.3'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  id: 'Set traffic for pinpoint service'
  dir: 'deploy-dashboard'
  args: [
    'app', 'services', 'set-traffic', 'pinpoint',
    '--splits=cloud-build-3a19f7a=1'
  ]
images: ['gcr.io/$PROJECT_ID/dashboard-base:latest']<commit_msg>[chromeperf] weekly moving versions forward<commit_after># These are the testing and deploy steps for the performance dashboard
# services. We re-use the docker-compose files in the dev_dockerfiles directory
# to ensure we're runing the same test and deploy cycle everytime.
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/docker'
  entrypoint: 'bash'
  args:
  - '-c'
  - |
    docker pull gcr.io/$PROJECT_ID/dashboard-base:latest || exit 0
- name: 'gcr.io/cloud-builders/docker'
  dir: 'dashboard/dev_dockerfiles'
  args: [
    'build',
    '-t', 'dashboard-base:latest',
    '-t', 'gcr.io/$PROJECT_ID/dashboard-base:latest',
    '--cache-from', 'gcr.io/$PROJECT_ID/dashboard-base:latest',
    '.'
  ]
- name: 'gcr.io/$PROJECT_ID/docker-compose'
  dir: 'dashboard/dev_dockerfiles'
  args: [
    'run', 'python-unittest-dashboard-py3'
  ]
# We need to provide the auth token that the service account is using to the
# container from which we're going to deploy the Dashboard services.
- name: 'gcr.io/$PROJECT_ID/docker-compose'
  dir: 'dashboard/dev_dockerfiles'
  args: [
    'run', 'cloudbuild-prepare-deployment-py3'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  entrypoint: '/bin/bash'
  args: [
      '-x', '-e', 'dashboard/dev_dockerfiles/cleanup_versions.sh',
      'api', 'default', 'pinpoint', 'upload-processing', 'upload'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  dir: 'deploy-dashboard'
  args: [
    app, deploy, '--no-promote', '--version', 'cloud-build-${SHORT_SHA}-py3',
    # We enumerate the files we need to deploy just for the dashboard.
    # TODO(dberris): Figure out how we can include cron.yaml and dispatch.yaml
    # from this automation. This fails in production with the service account
    # used by cloud-build, so we've left it out for now.
    # TODO(wenbinzhang): deploy other services when migration to python3 is done.
    # api.yaml,
    # app.yaml,
    # upload-processing.yaml,
    # upload.yaml,
    pinpoint-py3.yaml,
  ]
# We check in the target versions to avoid unintended traffic changes.
- name: 'gcr.io/cloud-builders/gcloud'
  id: 'Set traffic for default service'
  dir: 'deploy-dashboard'
  args: [
    'app', 'services', 'set-traffic', 'default',
    '--splits=cloud-build-aa7c33e=.7,cloud-build-3413510=.2,cloud-build-b26b298=.1'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  id: 'Set traffic for api service'
  dir: 'deploy-dashboard'
  args: [
    'app', 'services', 'set-traffic', 'api',
    '--splits=cloud-build-aa7c33e=.7,cloud-build-3413510=.2,cloud-build-b26b298=.1'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  id: 'Set traffic for upload service'
  dir: 'deploy-dashboard'
  args: [
    'app', 'services', 'set-traffic', 'upload',
    '--splits=cloud-build-aa7c33e=.7,cloud-build-07a32de=.2,cloud-build-b26b298=.1'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  id: 'Set traffic for upload-processing service'
  dir: 'deploy-dashboard'
  args: [
    'app', 'services', 'set-traffic', 'upload-processing',
    '--splits=cloud-build-aa7c33e=.7,cloud-build-07a32de=.2,cloud-build-b26b298=.1'
  ]
- name: 'gcr.io/cloud-builders/gcloud'
  id: 'Set traffic for pinpoint service'
  dir: 'deploy-dashboard'
  args: [
    'app', 'services', 'set-traffic', 'pinpoint',
    '--splits=cloud-build-3a19f7a=.7,cloud-build-b26b298=.3'
  ]
images: ['gcr.io/$PROJECT_ID/dashboard-base:latest']
{'fraction_non_alphanumeric': 0.15430091634643808, 'fraction_numerical': 0.023352054389595034, 'mean_word_length': 3.6065350578624913, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7585099', 'n_tokens_mistral': 2580, 'n_tokens_neox': 2459, 'n_words': 577}