-
Notifications
You must be signed in to change notification settings - Fork 9
Home
- What's the purpose of the Config Validator?
- What kind of files does this project validate?
- What kind of validation does it perform?
- Can I add my own validations?
- What are the steps to setup my config repo?
- Can I run the scripts locally?
Instructions
- If you have general questions regarding validation of config repo files, read on.
- If you want to jump ahead on the technical details, go to the sidebar with the topics in the order presented.
The Spring Cloud Config Validator, aka Config Validator
, can be used to automagically validate changes in configuration files from a Spring Cloud Config repo. That is, when changing files with extensions .json
, .yml
or .yaml
, or .properties
, Github Enterprise can statically validate those files on your behalf and, as a result of a failure, block commits from being merged on the origin.
This project is an optional helper service that can help you and your team increase the quality of the changes made to configuration files. In fact, it will definitely help you during any phase from development to production.
Go to section Setup Config Repo Hook if you already know about it and is ready to setup your repo.
This project will validate the extension files supported by the Spring Cloud Config Server, namely with extensions .json
, .yml
or .yaml
, or .properties
.
At this first implementation, this script will only perform static
validation based on the file extension.
-
.json
files are validated using the regular.json
parser https://docs.python.org/3/library/json.html. -
.yml
or.yaml
files are validated using a regular.yml
parser http://pyyaml.org/wiki/PyYAML. -
.properties
files are validated using a Java Properties parser https://pypi.python.org/pypi/pyjavaproperties.
Future releases will implement more validations.
Version v1.0.0
only supports static validation base on file extension as described above. We have plans to perform the following:
- Users define configuration validations in the level of properties.
- Variable Types
- Variable Type Ranges
- Others at your request.
Please contact the team on the links below for requirements.
Make sure you already have config properties.
Yes, you can! Before you do so, make sure you have either Python or Docker to execute the validation locally.