k8s.io/test-infra@v0.0.0-20240520184403-27c6b4c223d8/testgrid/build_test_update.md (about) 1 # Updating TestGrid 2 3 If you need to add a new test that you want TestGrid to display, see [TestGrid Configuration](config.md). 4 5 If you're looking to develop for TestGrid, welcome! Note that most of the inner workings of TestGrid 6 are not open source. This is a [known issue](https://github.com/kubernetes/test-infra/issues/10409). 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 [Configurator](cmd/configurator). 16 Updates to the [testgrid.k8s.io config] are automatically Configurated when a change is 17 merged. 18 19 You can convert a yaml file to the config proto with: 20 ``` 21 go run ./testgrid/cmd/configurator \ 22 --yaml=testgrid/config.yaml \ 23 --print-text \ 24 --oneshot \ 25 --output=/tmp/config.pb \ 26 # Or push to gcs 27 # --output=gs://my-bucket/config 28 # --gcp-service-account=/path/to/foo.json 29 ``` 30 31 For our production instance of TestGrid (https://testgrid.k8s.io), this file is read to a Google 32 Cloud Storage (GCS) location, and read from there. 33 34 ## Changing a .proto file 35 36 If you modify a .proto file, you'll also need to generate and check in the 37 .pb.go files. 38 39 Run `make update-protos` to generate, and `make run verify-protos` 40 to verify. 41 42 ## Testing 43 44 Run `go test ./testgrid` to run all unit tests in TestGrid. Note that this does not validate 45 the [testgrid.k8s.io config]; those tests are in `go test ./config/tests/testgrids` 46 47 Run `make test` for repository-wide testing, such as ensuring that 48 every job in our CI system appears somewhere in testgrid, etc. 49 50 [`config.proto`]: ./config/config.proto 51 [testgrid.k8s.io config]: /config/testgrids