This repository contains the schemas used by buildtest.
buildtest schema docs can be found at https://buildtesters.github.io/buildtest/
Currently, we support the following schemas:
- definitions: This schema definitions JSON definitions that are referenced by other schemas.
- global: The global schema inherited by all sub-schemas
- compiler-v1.0: Compiler sub-schema version 1.0 using
- script-v1.0: Script sub-schema version 1.0 using
- settings: This schema defines the content of buildtest settings file to configure buildtest.
The schemas are published at https://github.com/buildtesters/buildtest/tree/gh-pages/pages/devel/schemas
What is a schema?
A JSON-Schema is used to annotate and validate JSON documents. We write schemas in JSON and validate our Buildspecs (YAML) with one of the JSON Schemas. We make use of python-jsonschema to validate a Buildspec (YAML).
The schema examples are used for testing each schema during regression test and serve as a documentation guide. The schemas
and examples can be accessed via
buildtest schema command. Shown below is a list of examples for each schema.
Examples for global.schema.json
Examples for script-v1.0.schema.json
Examples for compiler-v1.0.schema.json
Examples for settings.schema.json
How are schemas defined in buildtest?
buildtest stores the schemas in top-level folder buildtest/schemas. The schemas examples are grouped into directories named by schemafile so you will see the following
$ ls -1 buildtest/schemas/examples compiler-v1.0.schema.json global.schema.json script-v1.0.schema.json settings.schema.json
The format for sub-schema is
<name>-vX.Y.schema.json. All schemas must end in .schema.json. The schemas and documentation are published
through this workflow. The pages are auto-generated and
pushed to top-level folder pages. Please do not write any files to this directory as
your files will be removed as part of the workflow.