deck file merge

Uses: deck

The deck file merge command merges multiple declarative configuration files in to a single file. This is useful at the end of your pipeline when linting and validation steps are run.

Unlike deck file render, environment variables are not evaluated by deck file merge. In addition, deck file merge can operate on partial configuration files, unlike deck file render.

The provided files can be in either JSON or YAML format.

deck file merge one.yaml two.yaml -o complete.yaml
Copied to clipboard!

Merge algorithm

The merge algorithm works in the following way:

  • Top level arrays are concatenated
  • Top level scalar values take the value from the last file passed as an argument

deck file merge does not perform any validations.

Command usage

Usage:
  deck file merge [flags] filename [...filename]

Examples:
# Merge 3 files
deck file merge -o merged.yaml file1.yaml file2.yaml file3.yaml

Flags:
      --format string        output format: yaml or json (default "yaml")
  -h, --help                 help for merge
  -o, --output-file string   Output file to write to. Use - to write to stdout. (default "-")

Copied to clipboard!

Did this doc help?

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!