Skip to content

Commit

Permalink
Update au.org.access-nri.model.spack.environment/deployment schema …
Browse files Browse the repository at this point in the history
…to `1-0-3`: Allow variants in spec string
  • Loading branch information
CodeGat committed Dec 2, 2024
1 parent 8e4da6b commit e69f15f
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 1 deletion.
62 changes: 62 additions & 0 deletions au.org.access-nri/model/spack/environment/deployment/1-0-3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"$id": "https://raw.githubusercontent.com/ACCESS-NRI/schema/main/au.org.access-nri/model/spack/environment/deployment/1-0-2.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,
"patternProperties": {
"(?!^all$)(^\\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,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^.+@git\\.[A-Za-z0-9.\\-_]+( .+)?$"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# `spack.yaml` Schema Changelog

## 1-0-3

* Updated `spack.specs` pattern to allow variants following the `@git.VERSION`. This has full interoperability with the earlier schema.

## 1-0-2

* Updated `spack.packages.*.require[0]` syntax to allow for versions that have a `/` in them. For example, `spack.packages.mypackage.require[0] == @git.user/feature` allows the `mypackage` to use the branch `user/feature` as a version. This has full interoperability with the earlier schema.

## 1-0-1

* Modified regex of `spack.packages.*.require[0]` to include `=` as a symbol. This allows versions like `@git.2024.05.28=access-esm1.5`. See issue https://github.com/ACCESS-NRI/spack-packages/issues/111 and related PR https://github.com/ACCESS-NRI/build-cd/pull/87. This has full interoperability with the earlier schema.
* Modified regex of `spack.packages.*.require[0]` to include `=` as a symbol. This allows versions like `@git.2024.05.28=access-esm1.5`. See [issue](https://github.com/ACCESS-NRI/spack-packages/issues/111) and related [PR](https://github.com/ACCESS-NRI/build-cd/pull/87). This has full interoperability with the earlier schema.

## 1-0-0

Expand Down

0 comments on commit e69f15f

Please sign in to comment.