Skip to the content.

buildtest logo

Buildtest Schema

This repository contains the schemas used by buildtest.

buildtest schema docs can be found at which can be used to reference the schema and assist you when you are writing buildspecs. Please refer to the buildtest documentation for help with buildtest.

Currently, we support the following schemas:

The schemas are published in schemas folder

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).

Schema Examples

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.schema.json

Examples for compiler.schema.json

Examples for spack.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 

The format for the schemas is <name>.schema.json where 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.