Either executes a command with environment variables taken from a YAML file, or prints a load of exports you can eval
yml2env <path-to-yaml-file> [<command> | --eval]
# Run command with env vars from YAML file
$ yml2env vars.yml tests.sh
# Set env vars in current shell
$ eval "$(yml2env var.yml --eval)"
It’s quite handy for using Concourse --load-vars-from files when running local tasks, like tests. The --eval feature is useful when you need to get lots of stuff from the output of a Concourse Terraform resource as env vars.
Given a YAML file stored in ci/vars/local.yml:
…running yml2env ci/vars/local.yml fly execute ci/tasks/system-tests.yml is equivalent to running