diff --git a/osbs/schemas/container.json b/osbs/schemas/container.json index 9c6a72db..0b90c058 100644 --- a/osbs/schemas/container.json +++ b/osbs/schemas/container.json @@ -17,6 +17,7 @@ "tags": {"$ref": "#/definitions/tags"}, "set_release_env": {"$ref": "#/definitions/set_release_env"}, "version": {"$ref": "#/definitions/version"}, + "remote_sources_version": {"$ref": "#/definitions/remote_sources_version"}, "go": {"$ref": "#/definitions/go"} }, "additionalProperties": false @@ -33,6 +34,7 @@ "tags": {"$ref": "#/definitions/tags"}, "set_release_env": {"$ref": "#/definitions/set_release_env"}, "version": {"$ref": "#/definitions/version"}, + "remote_sources_version": {"$ref": "#/definitions/remote_sources_version"}, "remote_source": {"$ref": "#/definitions/remote_source"} }, "additionalProperties": false @@ -49,6 +51,7 @@ "tags": {"$ref": "#/definitions/tags"}, "set_release_env": {"$ref": "#/definitions/set_release_env"}, "version": {"$ref": "#/definitions/version"}, + "remote_sources_version": {"$ref": "#/definitions/remote_sources_version"}, "remote_sources": {"$ref": "#/definitions/remote_sources"} }, "additionalProperties": false @@ -438,6 +441,14 @@ } }, "additionalProperties": false + }, + "remote_sources_version": { + "type": "number", + "description": "Feature version of remote sources", + "examples": [1, 2], + "minimum": 1, + "maximum": 2, + "default": 1 } } } diff --git a/tests/utils/test_yaml.py b/tests/utils/test_yaml.py index 026cb7cc..85e89ff2 100644 --- a/tests/utils/test_yaml.py +++ b/tests/utils/test_yaml.py @@ -303,6 +303,14 @@ def test_validate_with_schema_bad_schema(caplog): ), r"Additional properties are not allowed \('additional_property' was unexpected\)", ), + ( + ( + """ + remote_sources_version: 40 + """ + ), + r"40 is greater than the maximum of 2", + ), ], ) def test_invalid_remote_sources_schema(config, err_message, caplog):