Skip to content

Commit

Permalink
Move the additional properties at root level to ci config JSON schema.
Browse files Browse the repository at this point in the history
  • Loading branch information
haripate committed Feb 13, 2025
1 parent 1cf4186 commit 7367203
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 42 deletions.
50 changes: 24 additions & 26 deletions operator-pipeline-images/operatorcert/schemas/ci-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@
"type": "object",
"additionaProperties": true,
"properties": {
"updateGraph": {
"description": "Name of the update strategy for the operator",
"type": "string"
},
"reviewers": {
"description": "List of authorized GitHub usernames",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"merge": {
"description": "Flag that determines whether the PR is set to auto-merge",
"type": "boolean"
},
"cert_project_id": {
"description": "Certification Project ID linked with the operator",
"type": "string"
},
"fbc": {
"description": "Config set for FBC-enabled operator bundles",
"type": "object",
"properties": {
"updateGraph": {
"description": "Name of the update strategy for the operator",
"type": "string"
},
"reviewers": {
"description": "List of authorized GitHub usernames",
"type": "array",
"items": {
"type": "string",
"minItems": 1
}
},
"merge": {
"description": "Flag that determines whether the PR is set to auto-merge",
"type": "boolean"
},
"cert_project_id": {
"description": "Certification Project ID linked with the operator",
"type": "string"
},
"enabled": {
"description": "Flag that determines whether the operator uses FBC delivery method",
"type": "boolean"
Expand Down Expand Up @@ -57,12 +57,10 @@
}
},
"required": [ "template_name", "type", "catalog_names" ]

}
}
},
"minItems": 1,
"required": [ "catalog_mapping" ]
},
"minItems": 1
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,6 @@
},
id="Testing the validation for invalid fbc field type",
),
pytest.param(
[
bundle_files("hello", "0.0.1"),
{"operators/hello/ci.yaml": {"fbc": {"enabled": True}}},
],
("hello", "0.0.1"),
{
(
Fail,
"Operator's 'ci.yaml' contains invalid data "
"which does not comply with the schema: "
"'catalog_mapping' is a required property",
),
},
id="Testing the validation for missing catalog_mapping field",
),
pytest.param(
[
bundle_files("hello", "0.0.1"),
Expand Down

0 comments on commit 7367203

Please sign in to comment.