Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devatherock/drone-yaml-validator
CI plugin to validate yaml files
https://github.com/devatherock/drone-yaml-validator
ci ci-cd ci-plugin circleci docker drone-ci plugin vela yaml yaml-validator yml
Last synced: about 2 months ago
JSON representation
CI plugin to validate yaml files
- Host: GitHub
- URL: https://github.com/devatherock/drone-yaml-validator
- Owner: devatherock
- License: mit
- Created: 2018-09-24T03:27:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-05T21:35:01.000Z (3 months ago)
- Last Synced: 2024-10-21T05:42:12.412Z (2 months ago)
- Topics: ci, ci-cd, ci-plugin, circleci, docker, drone-ci, plugin, vela, yaml, yaml-validator, yml
- Language: Groovy
- Homepage:
- Size: 354 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![CircleCI](https://circleci.com/gh/devatherock/drone-yaml-validator.svg?style=svg)](https://circleci.com/gh/devatherock/drone-yaml-validator)
[![Version](https://img.shields.io/docker/v/devatherock/drone-yaml-validator?sort=semver)](https://hub.docker.com/r/devatherock/drone-yaml-validator/)
[![Coverage Status](https://coveralls.io/repos/github/devatherock/drone-yaml-validator/badge.svg?branch=master)](https://coveralls.io/github/devatherock/drone-yaml-validator?branch=master)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/eee25e47d4104a20894d2a0f8f35d2fd)](https://www.codacy.com/gh/devatherock/drone-yaml-validator/dashboard?utm_source=github.com&utm_medium=referral&utm_content=devatherock/drone-yaml-validator&utm_campaign=Badge_Grade)
[![Docker Pulls - Drone](https://img.shields.io/docker/pulls/devatherock/drone-yaml-validator.svg)](https://hub.docker.com/r/devatherock/drone-yaml-validator/)
[![Docker Image Size](https://img.shields.io/docker/image-size/devatherock/drone-yaml-validator.svg?sort=date)](https://hub.docker.com/r/devatherock/drone-yaml-validator/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
# yaml-validator
CI plugin to validate yaml files## Usage
### Docker```shell script
docker run --rm \
-e PLUGIN_DEBUG=true \
-v path/to/yamls:/work \
-w /work \
devatherock/drone-yaml-validator:latest
```### 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* **ignore_unknown_tags** - Flag to indicate if YAML files with unknown tags should be considered valid. Optional,
defaults to true#### vela
```yaml
steps:
- name: yaml_validator
ruleset:
branch: master
event: push
image: devatherock/drone-yaml-validator:latest
parameters:
debug: false
continue_on_error: true
allow_duplicate_keys: false
ignore_unknown_tags: true
```#### drone
```yaml
steps:
- name: yaml_validator
image: devatherock/drone-yaml-validator:latest
settings:
debug: false
continue_on_error: true
allow_duplicate_keys: false
ignore_unknown_tags: true
```#### CircleCI
```yaml
version: 2.1
jobs:
validate_yamls:
docker:
- image: devatherock/drone-yaml-validator:latest
working_directory: ~/my-repo
environment:
PARAMETER_DEBUG: false
PARAMETER_CONTINUE_ON_ERROR: true
PARAMETER_ALLOW_DUPLICATE_KEYS: false
PARAMETER_IGNORE_UNKNOWN_TAGS: true
steps:
- checkout
- run: sh /scripts/entry-point.sh
```## Tests
To test the latest plugin image, run the below command```shell
make functional-test
```