OPA/Rego deployment gateway policies: 5 rules (valid-environment, require-approvals, no-self-approval, block-weekends, freeze-window), a deploy-gate combining them, JSON schemas, scenario-driven tests, Gitea Actions CI (verify + publish to generic registry), changesets versioning, Makefile and scripts.
27 lines
619 B
JSON
27 lines
619 B
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"deployment": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"required": ["requested_by"],
|
|
"properties": {
|
|
"requested_by": {"type": "string"}
|
|
}
|
|
},
|
|
"approvals": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"required": ["active", "by"],
|
|
"properties": {
|
|
"active": {"type": "boolean"},
|
|
"by": {"type": "string"}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |