Packaging, rtut check, tests CI job; schemas move into the package (RBT-WP-0009-T02)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: sonnet Assistant-Process: 295952@bnt-lap001 Assistant-Session: e93f64ad-516c-46eb-9666-aad8d300c477
This commit is contained in:
parent
6d3414d8b7
commit
e021fd979f
16 changed files with 163 additions and 10 deletions
169
rtut/schema/project.schema.json
Normal file
169
rtut/schema/project.schema.json
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://runbook-tutorials.invalid/schema/project/v0.1",
|
||||
"title": "Project or project template",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"spec",
|
||||
"id",
|
||||
"title",
|
||||
"runbooks"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"spec": {
|
||||
"enum": [
|
||||
"project/v0.1",
|
||||
"project-template/v0.1"
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+([.-][a-z0-9]+)*$"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 3
|
||||
},
|
||||
"goal": {
|
||||
"type": "string"
|
||||
},
|
||||
"environment": {
|
||||
"enum": [
|
||||
"rehearsal",
|
||||
"staging",
|
||||
"production"
|
||||
]
|
||||
},
|
||||
"template": {
|
||||
"type": "string",
|
||||
"description": "Id of the template this project was created from."
|
||||
},
|
||||
"attribute_sets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"attributes": {
|
||||
"$ref": "#/$defs/attributes"
|
||||
},
|
||||
"targets": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"pattern": "^[a-z][a-z0-9-]*$"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"attribute_sets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"attributes": {
|
||||
"$ref": "#/$defs/attributes"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"runbooks": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"pack"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"pack": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "string"
|
||||
},
|
||||
"after": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"attributes": {
|
||||
"$ref": "#/$defs/attributes"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "What this project is, in its own words. Not inherited from a template."
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"spec": {
|
||||
"const": "project/v0.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"environment"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"$defs": {
|
||||
"attributes": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"pattern": "^[a-z][a-z0-9_]*$"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/attribute"
|
||||
}
|
||||
},
|
||||
"attribute": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": [
|
||||
"string",
|
||||
"integer",
|
||||
"boolean"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": [
|
||||
"string",
|
||||
"integer",
|
||||
"boolean"
|
||||
]
|
||||
},
|
||||
"requirement": {
|
||||
"enum": [
|
||||
"required",
|
||||
"optional"
|
||||
]
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"minProperties": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue