message: Add CI job name to sizetracker table schema
diff: @@ -52,6 +52,7 @@ from __future__ import print_function
  import argparse
  import csv
  import datetime
  +import os
  import os.path
  import platform
  import subprocess
  @@ -92,6 +93,10 @@ parser.add_argument(
  "--dry_run",
  action="store_true",
  help="Dry run: do not load to BigQuery or upload to GCS.")
  +parser.add_argument(
  + "--job",
  + type=str,
  + help="Name of job calling this script. Default: $KOKORO_JOB_NAME.")
  parser.add_argument(
  "--print_schema",
  action="store_true",
  @@ -140,6 +145,7 @@ SCHEMA = ",".join([
  "team:string",
  "logged_date:timestamp",
  "uploaded_to:string",
  + "job:string",
  ])
  # Select the earliest recorded commit in the same table for the same artifact
  # and team. Used to determine the full range of tested commits for each
  @@ -313,6 +319,7 @@ def build_row():
  FLAGS.team,
  current_time,
  get_upload_path(),
  + FLAGS.job,
  ]
  @@ -330,6 +337,9 @@ def main():
  "\nPass -h or --help for usage.")
  exit(1)
  + if not FLAGS.job:
  + FLAGS.job = os.environ.get("KOKORO_JOB_NAME", "NO_JOB")
  +
  # Generate data about this artifact into a Tab Separated Value file
  next_tsv_row = build_row()
  