Backstage entity validator
npm install @roadiehq/backstage-entity-validatorThis package can be used as a GitHub action or a standalone node.js module
#### path
Optional Path to the catalog-info.yaml file to validate. Defaults to catalog-info.yaml at the root of the repository. It also can be a glob like services/*/catalog-info.yaml or a list of files separated by comma users.yaml,orgs/company.yaml.
#### verbose
Optional Specify whether the output should be verbose. Default true.
None. Prints out the validated YAML on success. Prints out errors on invalid YAML
- uses: RoadieHQ/backstage-entity-validator@v0.3.11
with:
path: 'catalog-info-1.yaml'
``
- uses: RoadieHQ/backstage-entity-validator@v0.3.11
with:
path: 'catalog-info-1.yaml,catalog-info-2.yaml,catalog-info-3.yaml'
``
- uses: RoadieHQ/backstage-entity-validator@v0.3.11
with:
path: 'catalog-info-.yaml,services///catalog-info.yaml'
``
- uses: RoadieHQ/backstage-entity-validator@v0.3.2
with:
path: 'catalog-info-.yaml,services///catalog-info.yaml'
validationSchemaFileLocation: 'custom-validation-schema.json'
`CircleCI Orb
$3
####
pathOptional Path to the catalog-info.yaml file to validate. Defaults to
catalog-info.yaml at the root of the repository.$3
None. Prints out the validated YAML on success. Prints out errors on invalid YAML
$3
`
description: >
Sample catalog-info.yaml validation
usage:
version: 2.1
orbs:
entity-validator: "roadiehq/backstage-entity-validator@0.3.11"
workflows:
use-entity-validator:
jobs:
- entity-validator/validate:
path: catalog-info.yaml
`Docker
The validator is available as a Docker image at
roadiehq/backstage-entity-validator.$3
`bash
Validate a file in the current directory
docker run --rm -v $(pwd):/workdir roadiehq/backstage-entity-validator catalog-info.yamlValidate multiple files
docker run --rm -v $(pwd):/workdir roadiehq/backstage-entity-validator catalog-info.yaml other-file.yamlValidate with glob pattern
docker run --rm -v $(pwd):/workdir roadiehq/backstage-entity-validator "services/*/catalog-info.yaml"
`$3
-
latest - Latest release
- x.y.z - Specific version (e.g., 0.6.2)Using the CLI
$3
`
Usage: validate-entity [OPTION] [FILE]Validates Backstage entity definition files. Files may be specified as
arguments or via STDIN, one per line.
OPTION:
-h display help
-q minimal output while validating entities
-i validate files provided over standard input
-l location of custom validation schema file
`Examples:
`
in a shell
validate all entities contained in the "catalog" and subfolders
validate-entity catalog/*/.yamllist of files produced by a script to validate
find-relevant-yaml-files.sh | validate-entity -i
`$3
#### As a global tool
`
install
npm install --global @roadiehq/backstage-entity-validatorrun
validate-entity file1.yaml file2.yaml
`
#### In an existing node project`
install
npm install --save-dev @roadiehq/backstage-entity-validatorrun
npx validate-entity file1.yaml file2.yaml
`#### When working on this tool
`
install
npm installrun
npm run validate file1.yaml file2.yamlor
bin/bev file1.yaml file2.yaml
``