Clone this repo:
  1. 514b6ed ci_results_archiver: Update OWNERS. by Kirtika Ruchandani · 4 months ago factory-drallion-13080.B firmware-drallion-12930.B master release-R82-12974.B release-R83-13020.B release-R84-13099.B stabilize-12951.B stabilize-12997.B stabilize-13020.55.B stabilize-13020.67.B stabilize-sylas-13019.B stabilize-volteer-12931.B
  2. 4aa1f49 drop COMMIT-QUEUE.ini by Ross Zwisler · 5 months ago release-R81-12871.B stabilize-12859.B stabilize-12871.102.B stabilize-12871.103.B stabilize-12871.24.B stabilize-12871.57.B stabilize-12871.65.B stabilize-12871.91.B stabilize-12881.B stabilize-quickfix-12871.27.B
  3. 079bff6 ci_results_archiver: place prod and dev config to their own folder by Xinan Lin · 6 months ago factory-excelsior-12812.B firmware-servo-12768.B release-R80-12739.B stabilize-12739.105.B stabilize-12739.106.B stabilize-12739.111.B stabilize-12748.B stabilize-excelsior-12739.67.B stabilize-quickfix-12739.71.B
  4. d4cdd8b ci_results_archiver: improve the container building by Xinan Lin · 6 months ago
  5. eeb02cf ci_results_archiver: add README file by Xinan Lin · 6 months ago

ci_results_archvier

Setup

  1. Install mysql client:

     sudo apt-get install default-libmysqlclient-dev libssl-dev
    
  2. Install python libs:

     make load-libs
    

Known Issues

  1. _mysql.c:2005:41: error: 'MYSQL' {aka 'struct st_mysql'} has no member named 'reconnect':

    This may happen on Debian based system. Workaround: Run sudo sed '/st_mysql_options options;/a unsigned int reconnect;' /usr/include/mysql/mysql.h -i.bkp.

Unit test

  1. Run unit test:

     make unit-test
    

E2E test

  1. Configure your db information into the config-dev file:

tko: credentials: hostname: your_sql_instance_ip username: sql_use password: sql_password database: sql_db_name timezone: US/Pacific

  1. Run ci_results_archiver locally:

     make run-local
    

Note, this will run in one-shot mode with the dev config. Make sure your desktop IP has been whitelisted by the TKO Cloud SQL instance. To export data to BigQuery, you need a service account json key in the folder. For internal users, run make load-credentials first.

Build the docker

  1. Build the docker locally:

     make local-build
    
  2. Build docker on GCP:

     make cloud-build
    

By default it creates the image to project google.com:chromeos-lab. If this is not your preference, please configure it in Makefile.

Deploy to GKE cluster

If you want to deploy the docker to ChromeOS Lab project, please refer our internal doc for more details.