Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 183 additions & 0 deletions au.org.access-nri/model/spack/environment/deployment/2-0-0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
{
"$id": "https://raw.githubusercontent.com/ACCESS-NRI/schema/main/au.org.access-nri/model/spack/environment/deployment/2-0-0.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Restricted spack environment file schema for ACCESS-NRI continuous deployment",
"description": "This schema was adapted from https://github.com/ACCESS-NRI/spack/blob/releases/v0.21/lib/spack/spack/schema/env.py to specify a restricted form of spack.yaml to design generic deployment infrastructure.",
"type": "object",
"additionalProperties": false,
"properties": {
"spack": {
"type": "object",
"default": {},
"additionalProperties": true,
"properties": {
"packages": {
"type": "object",
"default": {},
"additionalProperties": true,
"properties": {
"gcc-runtime": {
"type": "object",
"default": {},
"additionalProperties": true,
"properties": {
"require": {
"type": "array",
"minItems": 1,
"additionalItems": true,
"items": {
"oneOf": [
{
"type": "object"
},
{
"type": "string"
}
]
}
}
}
}
},
"patternProperties": {
"(?!^(all|gcc-runtime)$)(^\\w[\\w-]*)": {
"type": "object",
"default": {},
"additionalProperties": true,
"properties": {
"require": {
"type": "array",
"minItems": 1,
"additionalItems": true,
"items": [
{
"type": "string",
"pattern": "^@[A-Za-z0-9.\\-_=\/]+$"
},
{
"oneOf": [
{
"type": "object"
},
{
"type": "string"
}
]
}
]
}
}
}
}
},
"specs": {
"type": "array",
"default": [],
"minItems": 1,
"items": {
"type": "string"
}
},
"definitions": {
"type": "array",
"default": [],
"items": {
"type": "object",
"required": ["_name", "_version"],
"properties": {
"_name": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
"_version": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
"ROOT_PACKAGE": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
"ROOT_SPEC": {
"type": "array",
"items": {
"type":"object",
"properties": {
"matrix": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
},
"exclude": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
},
"if": {
"properties": {
"spack": {
"type": "object",
"properties": {
"specs": {
"type": "array",
"contains": {
"const": "$ROOT_SPEC"
}
}
}
}
}
},
"then": {
"properties": {
"spack": {
"type": "object",
"properties": {
"definitions": {
"allOf": [
{
"type": "array",
"contains": {
"type": "object",
"required": ["ROOT_SPEC"]
}
},
{
"type": "array",
"contains": {
"type": "object",
"required": ["ROOT_PACKAGE"]
}
}
]
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# `spack.yaml` Schema Changelog

## 2-0-0

* Require reserved definitions for `spack.definitions[]._name` and `spack.definitions[]._version`
* Relax requirements on `spack.specs` entirely

## 1-0-7

* Allow the use of `@latest` in `spack.specs[0]`. This is allowed for Prereleases, but not for Releases. This keeps continuity with local builds which can't use not-yet-existing `@git.TAG`s like Prerelease builds can.
Expand Down