Releases: geofffranks/spruce
spruce-release Release v1.15.0
Improvements
spruce diff
now returns exit status 1 if there are any differences; and exit status 0 if no differences [thanks @drnic]
spruce-release Release v1.14.0
Improvements
- Spruce will now ignore things that look like BOSH/Concourse
variables, so you can pass-through things like((my-cert))
without throwing an error about unknown Spruce operators.
spruce-release Release v1.13.1
Improvements
- If you need to change the way maps are merged throughout an entire file,
theDEFAULT_ARRAY_MERGE_KEY
environment variable can be set, to override
the default value of 'name'. This makes it easy to not need to put(( merge on identifier ))
everywhere in your YAML, whenname
is not the desired key.
Bug Fixes
- Fixed an issue when grabbing multi-line string values from environment variables with
(( grab $MULTI_LINE_STRING_VAR ))
Acknowledgements
Thanks for the bugfix @sorenh!
spruce-release Release v1.13.0
New Features
- There is a new
(( ips ))
operator, provided by Soren Hansen!
It calculates IPs using indices and offests from a given IP or
CIDR block. Useful if you need to calculate an IP in a non-BOSH
YAML file, or if the IPs fall outside of the range of BOSH networks
defined in them anifest. See the IPs operator docs for more info.
Improvements
spruce
is now built with golang 1.9
Bug Fixes
spruce
will now honor the System's trusted root CAs on Darwin,
when connecting to Vault
Acknowledgements
Thanks @sorenh for your work on the (( ips ))
operator, and the bugfixes you
provided for the 1.12.2 release!
spruce-release Release v1.12.2
Bug Fixes
-
When pulling environment variables in, their values are now
unmarshaled into appropriate types via YAML. For example,PORT=123
will be used as an integer in the output YAML. This may cause problems
if a consumer of the output YAML is requiring a string value of the number/boolean
being displayed. If this is the case,(( concat $PORT "" ))
can be
used as a workaround. It seems more likely that there will be consumers
requiring the value as an integer/boolean type rather the stringified version. -
Resolved an issue where
spruce diff
was not noticing changes in
type between values. For example, changing from"123" to
123`
will now produce diff output.
spruce-release Release v1.12.1
Bug Fixes
- Fixed lack of
--go-patch
support inspruce vaultinfo
spruce-release Release v1.12.0
Windows
Experimental Windows binaries are being shipped alongside spruce now!
If you encouter any strange issues, submit a GH issue.
Bug Fixes
-
--skip-eval
properly skips(( param ))
and(( inject ))
operators now.prune
behavior works as it has in the past (the(( prune ))
operators are not evaluated,
but--prune
arguments are. -
When using the
(( delete ))
array operator, the quotes are no longer required:- (( delete "myObj" )) - (( delete myObj ))
Deprecation notices
- The
--concourse
flag forspruce
is now deprecated. It will be removed in a future
release. Its purpose was to allow parsing of{{variable}}
interpolation inside
Concourse YAML files. As an alternative, try using built-inspruce
operators,
or the((!variable))
syntax to make use of CredHub data in Concourse.
spruce-release Release v1.11.0
New Features
-
spruce
now supports go-patch files
in itsmerge
phase via the--go-patch
flag. This means you can interleave
traditional spruce/yaml files with go-patch files. The go-patch files will be
merged into the document, and can even be used to insert spruce operators to
be evaluated later.For example:
spruce merge --go-patch base.yml patch.yml more-spruce.yml
will apply
the go-patch filepatch.yml
on top ofbase.yml
, and then merge inmore-spruce.yml
via traditional spruce merging logic. Once merging is complete, the other
evaluation phases take place, executing operators, requiring params, etc. -
Added the
(( defer ))
operator. This allows you to specify
an operation in your yaml that you wish to defer until a later sprucing.
This can be useful for using spruce to generate more spruce templates,
or to handle content that requires(( ... ))
syntax, like CredHub.For example:
still_a_grab_op: (( defer grab myval )) myval: 1
Would yield:
still_a_grab_op: (( grab myval )) myval: 1
when merged a single time. Running it through spruce again would result
in the grab being evaluated. -
Not technically a new feature, but newly documented as a feature is the
((! ... ))
syntax. Spruce will ignore this completely, and not attempt
to evaluate any operations on it. Unlike defer, the output will be identical
to the input (the exclamation point is kept in the output).
Bug Fixes
-
Fixes #201 by supporting
azs
key in subnetsPreviously only
az
was supported. Now when specifying
multiple AZs in a subnet, all IPs from that subnet can be
used in any instance-group/job that is in a zone that the
subnet mentioned.This can lead to interesting scenarios when using mixes of
multi-az subnets and single-az subnets, where different offsets
can mean the same IP in a different zone, or the same index could
mean different IPs in different zones. Try not to do this, as it will
likely lead to confusion down the road. However, care is made to ensure
that IPs are never re-used, regardless of what subnets/azs they were
allowed to be used by.This should not affect any existing IP allocations, since previously the
azs
field wasn't looked at, and the old behaviors remain the same
foraz
and no-azs. -
Fixes #153 and #169. The result of the cartesian-product operator
now behaves as it should in join/concat/inject and other operators. -
Integers above a 64-bit unsigned quantity are now supported in operations.
They are automatically converted to scientific notation, and treated as floats.
Acknowledgements
Thanks to @thomasmmitchell, @jhunt, and @poblin-orange for their help on all the features
and fixes in this release!
spruce-release Release v1.10.0
New Features
- There is now a
--fallback-append
flag to change the default array merge behavior
from inline to append.
Acknowledgements
Thanks @thomasmmitchell for the feature!
spruce-release Release v1.9.0
New Features
- There is now a
spruce vaultinfo
command. It examines your
yaml data to find all thevault
operators being used, and spits
out a summary of the keys being requested from vault, and what paths
are requesting them.
Acknowledgements
Thanks @thomasmmitchell for the new feature!