Coder Social home page Coder Social logo

stefanbuck / backstage-entity-validator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roadiehq/backstage-entity-validator

0.0 2.0 0.0 1.46 MB

Validate properties and well known annotations in your Backstage catalog-info.yaml files.

JavaScript 98.23% Shell 1.77%

backstage-entity-validator's Introduction

Backstage entity validator

This package can be used as a GitHub action or a standalone node.js module

GitHub action

Inputs

path

Optional Path to the catalog-info.yaml file to validate. Defaults to catalog-info.yaml at the root of the repository.

Outputs

None. Prints out the validated YAML on success. Prints out errors on invalid YAML

Example usage

- uses:  RoadieHQ/[email protected]
  with:
    path: 'catalog-info-1.yaml'

CircleCI Orb

Inputs

path

Optional Path to the catalog-info.yaml file to validate. Defaults to catalog-info.yaml at the root of the repository.

Outputs

None. Prints out the validated YAML on success. Prints out errors on invalid YAML

Example config

description: >
  Sample catalog-info.yaml validation
usage:
  version: 2.1
  orbs:
    entity-validator: "roadiehq/[email protected]"
  workflows:
    use-entity-validator:
      jobs:
        - entity-validator/validate:
            path: catalog-info.yaml

Using the CLI

Usage

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

Examples:

# in a shell

# validate all entities contained in the "catalog" and subfolders
validate-entity catalog/**/*.yaml

# list of files produced by a script to validate
find-relevant-yaml-files.sh | validate-entity -i 

Installing and running

As a global tool

# install
npm install --global @roadiehq/backstage-entity-validator

# run
validate-entity file1.yaml file2.yaml

In an existing node project

# install
npm install --save-dev @roadiehq/backstage-entity-validator

# run
npx validate-entity file1.yaml file2.yaml

When working on this tool

# install
npm install

# run
npm run validate file1.yaml file2.yaml

# or
bin/bev file1.yaml file2.yaml

backstage-entity-validator's People

Contributors

xantier avatar joncfoo avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.