mandelsoft / spiff Goto Github PK
View Code? Open in Web Editor NEWIn-domain YAML templating engine spiff++
License: Apache License 2.0
In-domain YAML templating engine spiff++
License: Apache License 2.0
It is not easily possible to create a yaml file that contains dynaml expressions after being parsed by spiff.
For example, I would have expected this expression
foo: (( "(( bar ))" ))
to result in
foo: (( bar ))
which I could render with spiff again at a later time when bar
is available. However, when rendering the above expression, spiff immediately also tries to resolve the resulting (( bar ))
which causes an error in this case, since bar
does not exist.
It is possible to achieve some kind of unresolved dynaml expression by using &template
, but this makes things more complicated.
It should somehow be possible to write a dynaml expression that renders into another dynaml expression.
can someone help spiff merge issues for this case?
template.yaml
command: ["/cloud_sql_proxy",
"-instances="(( .postgresconnectionnam ))"=tcp:5432"]
values.yaml
postgresconnectionname: PROJECT:REGION:INSTANCE
spiff merge template.yml values.yml
Output:
- /cloud_sql_proxy
- -instances=(( .postgresconnectionnam ))=tcp:5432
but the output should be
command:
- /cloud_sql_proxy
- -instances=PROJECT:REGION:INSTANCE=tcp:5432
I see that data is not getting interpolated. can someone help here?
This is a pretty cool project! I was wondering if any consideration has ever been made about support for external resources, either remote (across a network, e.g. something in a Github repo) or just somewhere else on disk. The remote case would be interesting if it was vcs aware allowing e.g. reference of a Git repo and tag to manage versioning.
spiff++
seems to automatically wrap long lines:
foo.yaml:
wrapTest: a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
spiff merge foo.yaml =>
wrapTest: a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a
It should somehow be possible to suppress this behaviour, as it e.g. screws with pattern matching.
please fix or do a 1.3.0 release.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.