Skip to content

CICD-423 · Service catalog synchronization ​

Encyclopedia · Platform engineering and internal developer platforms · All snippets

Previous · CICD-422 · Next · CICD-424

1. Where it fits ​

  • Placement CI run step or authorized lab terminal.
  • Prerequisites platform sandbox, scoped identities and reviewed service catalog or provisioning policy.
  • Platforms kubernetes, local-lab.
  • Parameters CATALOG_URL.

2. Copy the snippet ​

bash
curl -fsS "${CATALOG_URL:?}/api/catalog/entities?filter=kind%3Dcomponent" | jq -e 'map(.metadata.name) | sort' > catalog-components.json

3. How it works ​

The request checks the selected HTTP interface. Timeouts limit waiting, and an explicit exit or payload condition determines pass and fail. 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 ​

Use an authorized read session. Handle pagination or use the catalog API's pagination explicitly if enabled.

Validation syntax-validated (Bash parse). Status definitions.