Skip to content

amaybaum-prod/drone-yaml-validator

 
 

Repository files navigation

CircleCI Version Coverage Status Codacy Badge Docker Pulls - Drone Docker Image Size License: MIT

yaml-validator

CI plugin to validate yaml files

Usage

Docker

docker run --rm \
  -e PLUGIN_DEBUG=true \
  -v path/to/yamls:/work \
  -w=/work \
  devatherock/drone-yaml-validator:2.0.0

CI

The following parameters can be set to configure the plugin.

  • debug - Flag to enable debug logs. Optional, by default, debug logs are disabled

  • continue_on_error - Flag to indicate if processing should continue when an invalid file is encountered. Optional, defaults to true

  • search_path - If specified, only YAMLs present in this path will be validated

  • allow_duplicate_keys - Flag to indicate if YAML files with duplicate keys should be considered valid. Optional, defaults to false

vela

steps:
  - name: yaml_validator
    ruleset:
      branch: master
      event: push
    image: devatherock/drone-yaml-validator:2.0.0
    parameters:
      debug: false
      continue_on_error: true
      allow_duplicate_keys: false

drone

steps:
  - name: yaml_validator
    image: devatherock/drone-yaml-validator:2.0.0
    settings:
      debug: false
      continue_on_error: true
      allow_duplicate_keys: false

CircleCI

version: 2.1
jobs:
  validate_yamls:
    docker:
      - image: devatherock/drone-yaml-validator:2.0.0
    working_directory: ~/my-repo
    environment:
      PARAMETER_DEBUG: false
      PARAMETER_CONTINUE_ON_ERROR: true
      PARAMETER_ALLOW_DUPLICATE_KEYS: false
    steps:
      - checkout
      - run: sh /scripts/entry-point.sh

Tests

To test the latest plugin image, run the below command

make functional-test

About

CI plugin to validate yaml files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Groovy 89.1%
  • Makefile 5.1%
  • Shell 4.5%
  • Dockerfile 1.3%