Skip to the content.

Buildtest Schema

This repository contains the schemas used by buildtest.

buildtest schema docs can be found at https://buildtesters.github.io/buildtest/ which can be used to reference the schema and assist you when you are Writing Buildspecs. Please refer to official 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-v1.0.schema.json

Examples for compiler-v1.0.schema.json

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