Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.82 KB

build_test_update.md

File metadata and controls

49 lines (36 loc) · 1.82 KB

Updating TestGrid

If you're looking to develop for TestGrid, welcome!

While the front-end UI is not currently open source, it can be used as a service. If you would like to propose a UI change or feature, please file a bug describing how you would like the UI to behave.

YAML configuration and config.proto

While TestGrid configuration is located in YAML files, TestGrid doesn't natively read YAML. Instead, it expects configuration data in config.proto. This file is commented, and should be treated as the authoritative "input" schema to TestGrid.

config.proto is generated primarily with Configurator. Updates to the testgrid.k8s.io config are automatically Configurated when a change is merged.

You can convert a yaml file to the config proto with:

bazel run //testgrid/cmd/configurator -- \
  --yaml=testgrid/config.yaml \
  --print-text \
  --oneshot \
  --output=/tmp/config.pb \
  # Or push to gcs
  # --output=gs://my-bucket/config
  # --gcp-service-account=/path/to/foo.json

For our production instance of TestGrid (https://testgrid.k8s.io), this file is read to a Google Cloud Storage (GCS) location, and read from there.

Changing a .proto file

If you modify a .proto file, you'll also need to generate and check in the .pb.go files.

Run bazel run //hack:update-protos to generate, and bazel run //hack:verify-protos.sh to verify. This command requires python to be installed.

Testing

Run bazel test //... to run all unit tests in TestGrid. Note that this does not validate the testgrid.k8s.io config; those tests are in bazel test //config/tests/testgrids/...