k8s.io/test-infra@v0.0.0-20240520184403-27c6b4c223d8/testgrid/cmd/configurator/README.md (about) 1 # Configurator 2 3 Configurator takes some YAML TestGrid config files and (optionally) a Prow configuration and generates 4 a complete TestGrid configuration. 5 6 This utility is important for the [inner workings](/testgrid/build_test_update.md) of TestGrid, but if 7 you're looking to just add to or modify an existing configuration, read [`config.md`] 8 instead. 9 10 ## Basic Usage 11 12 `configurator --yaml=config.yaml --print-text --oneshot` will read the configuration from the YAML 13 file and print it to standard output for humans to read. 14 15 If `--oneshot` is omitted, it will do the same thing and continue running. If the configuration it's 16 reading is modified, it will generate again. 17 18 Instead of `--print-text`, you can just `--validate-config-file`, or specify an `--output`. 19 20 ```bash 21 --output=/path/outputfile # Writes the generated configuration to that file 22 --output=gcs://bucket/object # Writes the generated configuration to a GCS bucket. Credentials are needed. 23 ``` 24 25 `--default` specifies default settings to use whenever a setting isn't specified in the YAML configuration. 26 27 ## Usage with Prow 28 29 If TestGrid is running in parallel with [Prow], configuration can be annotated to a Prow job instead 30 of separately configured in a YAML file. Details for how to write these annotations are in [`config.md`]. 31 32 The options `--prow-config` and `--prow-job-config` are used to specify where the Prow configurations are. 33 They must be specified together. 34 35 ## Deserialization Options 36 37 Configurator reads YAML configurations. TestGrid itself expects its configuration to be formatted as 38 a [protocol buffer][`config.proto`], and has no concept of a YAML configuration. 39 40 By default, Configurator outputs a [`config.proto`], since it usually serves configurations to TestGrid. 41 Configuration can also output a YAML configuration; for an example, see [`transfigure`](/testgrid/cmd/transfigure/README.md). 42 43 [`config.proto`]: https://github.com/GoogleCloudPlatform/testgrid/blob/master/pb/config/config.proto 44 [`config.md`]: /testgrid/config.md 45 [Prow]: /prow/README.md