github.com/GoogleCloudPlatform/testgrid@v0.0.174/build_test_update.md (about) 1 # Updating TestGrid 2 3 If you're looking to develop for TestGrid, welcome! 4 5 While the front-end UI is not currently open source, it can be used as a [service](./standalone.md). 6 If you would like to propose a UI change or feature, please file a bug describing how you would like the UI to behave. 7 8 ## YAML configuration and config.proto 9 10 While TestGrid configuration is located in YAML files, TestGrid doesn't natively 11 read YAML. Instead, it expects configuration data in [`config.proto`]. This file 12 is commented, and should be treated as the authoritative "input" schema to 13 TestGrid. 14 15 [`config.proto`] is generated primarily with 16 [Configurator](https://github.com/kubernetes/test-infra/blob/master/testgrid/cmd/configurator). 17 Updates to the [testgrid.k8s.io config] are automatically Configurated when a change is 18 merged. 19 20 You can convert a yaml file to the config proto with: 21 ``` 22 bazel run //testgrid/cmd/configurator -- \ 23 --yaml=testgrid/config.yaml \ 24 --print-text \ 25 --oneshot \ 26 --output=/tmp/config.pb \ 27 # Or push to gcs 28 # --output=gs://my-bucket/config 29 # --gcp-service-account=/path/to/foo.json 30 ``` 31 32 For our production instance of TestGrid (https://testgrid.k8s.io), this file is read to a Google 33 Cloud Storage (GCS) location, and read from there. 34 35 ## Changing a .proto file 36 37 If you modify a .proto file, you'll also need to generate and check in the 38 .pb.go files. 39 40 Run `bazel run //hack:update-protos` to generate, and `bazel run //hack:verify-protos.sh` 41 to verify. This command requires `python` to be installed. 42 43 ## Testing 44 45 Run `bazel test //...` to run all unit tests in TestGrid. Note that this does not validate 46 the [testgrid.k8s.io config]; those tests are in `bazel test //config/tests/testgrids/...` 47 48 [`config.proto`]: ./config/config.proto 49 [testgrid.k8s.io config]: https://github.com/kubernetes/test-infra/blob/master/config/testgrids