-
-
Save betaboon/bb0f7382993b8553d667d5644d0056e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
patchPhase = '' | |
${python3}/bin/python - << EOF | |
import yaml | |
import json | |
def yaml2json(yaml_file, json_file): | |
with open(yaml_file, "r") as i, open(json_file, "w") as o: | |
o.write(json.dumps(yaml.load(i.read()))) | |
yaml2json("apm-server.yml", "apm-server.json") | |
yaml2json("fields.yml", "fields.json") | |
EOF | |
cat apm-server.json | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment