-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import arbitrarty YAML/JSON #85
Labels
Comments
Another solution for this is simply including the yaml as additional documents in
note: golang #!/usr/bin/env -S go run github.com/rliebz/[email protected] -f
---
tasks:
read-one:
run:
- go run github.com/mikefarah/yq/v3@latest r tusk.yaml -d1
read-two:
run:
- go run github.com/mikefarah/yq/v3@latest r tusk.yaml -d2 spec
---
document: one
---
spec:
document:
two: example
|
Cool trick @moondev. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Sometimes it would be nice to be able to import arbitrary data from other YAML (or JSON) files, and use values from these files without having to duplicate configuration.
One concrete example that we will look at below, is how to use a config files generated by appctl. This file looks something like this:
It would be nice to be able to extrat and work with these variables in tusk in one way or another.
Describe the solution you'd like
It's not important to me how this works. But here is one possible syntax:
Full example:
The final run line without an "alias" feature:
The purpose of this syntax example is not to propose an actual syntax, but to explain the feature.
Additional context
Possible concern with example syntax:
${}
clauses, an option named "imports" would conflict with the imports section.Possible solutions:
"${delivery-dev}"
not"${imports.delivery-dev}"
.The text was updated successfully, but these errors were encountered: