schema/v1.json: support conditional schema requirements
This changes the v1.json schema is be aware of "fedora-coreos" and
"rhcos" builds. Using the "name" key, the schema is conditionally
applied.
fixtures/fcos.json: defined test JSON for Fedora CoreOS
tests/test_cosalib_meta.py: support testing both FCOS and RHCOS schemas
Makefile: set the directory for the test JSON.
},
"then": {
"required": [
- "fedora-coreos.parent-commit",
- "fedora-coreos.parent-version",
"ref"
+ ],
+ "optional": [
+ "fedora-coreos.parent-commit",
+ "fedora-coreos.parent-version"
]
},
"else": {}
{
"if": {
"properties": {
- "name": { "pattern": "^(rhcos|fedora-coreos)" }
+ "name": { "pattern": "^(rhcos|fedora-coreos)$" }
}
},
"then": {
"coreos-assembler.code-source",
"coreos-assembler.config-dirty",
"coreos-assembler.config-gitrev",
- "coreos-assembler.container-config-git",
- "coreos-assembler.container-image-git",
"coreos-assembler.image-config-checksum",
"coreos-assembler.image-genver",
"coreos-assembler.image-input-checksum"
