CICD-413 · Service ownership validation
Encyclopedia · Platform engineering and internal developer platforms · All snippets
Previous · CICD-412 · Next · CICD-414
1. Where it fits
- Placement CI ownership gate.
- Prerequisites platform sandbox, scoped identities and reviewed service catalog or provisioning policy.
- Platforms kubernetes, local-lab.
2. Copy the snippet
bash
owner=$(yq -er '.spec.owner' catalog-info.yaml)
jq -e --arg owner "$owner" 'index($owner) != null' policy/approved-owners.json3. How it works
The expression reads or updates the selected YAML path. Check matching nodes and the rendered desired state. The expression filters or transforms the input JSON. Where jq -e is used, a false or empty result can fail the gate.
4. Verify the result
Owner IDs must be normalized to full entity refs. Reject ownerless or retired teams.
Validation syntax-validated (Bash parse). Status definitions.