Skip to content

Merge multiple YAML files into a single YAML file. Written in Java.

License

Notifications You must be signed in to change notification settings

hilitee/yaml-merge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YAML Merge

Merges multiple YAML files into a single file, and substitutes environment variables found as {{VARIABLE_NAME}}.

This is a fork by Ondrej Zizka, with upgraded dependencies. Soon to be released (once I get an approval from Sonatype).

Original code from 2013 by Jonathan Cobb. This code is available under the Apache License, version 2: http://www.apache.org/licenses/LICENSE-2.0.html

Build

mvn -Drelease install

Requires Maven build automation tool.

Usage

./bin/yaml-merge.sh file1.yaml file2.yaml ... > merged-result.yaml

Files are merged in order, such that files listed later will override files listed earlier.

The merged result is written to stdout. Logs (for info & errors) are written to stderr.

Within the YAML files to be merged, you may include references to environment variables using mustache-style syntax, for example:

callbackUrl: http://www.{{DEPLOY_HOST_NAME}}.example.com:8102/my_callback

Then make sure you've exported the DEPLOY_HOST_NAME environment variable to whatever place you invoke yaml-merge from.

About

Merge multiple YAML files into a single YAML file. Written in Java.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 95.9%
  • Shell 4.1%