mirror of
https://git.sr.ht/~goorzhel/turboprop
synced 2024-12-14 11:37:37 +00:00
Update get_values post-refactor
This commit is contained in:
parent
a27d902cd3
commit
22055d6fd2
1 changed files with 10 additions and 7 deletions
|
@ -8,16 +8,19 @@
|
|||
# 2. the values are already baked into the derivations,
|
||||
# so having them in the output would be redundant.
|
||||
|
||||
ns=$1
|
||||
name=$2
|
||||
if ! [ "$1" ]; then
|
||||
echo "Usage: $0 releases/svc/breezewiki (or similar)"
|
||||
fi
|
||||
|
||||
path=$1
|
||||
|
||||
chart_drv=$(nix derivation show "$(readlink result)" \
|
||||
| jq -r '.[].env.release_drvs' | tr ' ' '\n' | grep "$ns-$name"
|
||||
# Also acceptable, but requires '^*' appended in next `nix` command
|
||||
# because this is the .drv path:
|
||||
# | jq -r '.[].inputDrvs | keys[] | select(test("'"$ns-$name"'"))'
|
||||
| jq -r '.[].env.derivation_paths' \
|
||||
| tr ' ' '\n' \
|
||||
| grep "$path/RELEASE.yaml" \
|
||||
| cut -d: -f2
|
||||
)
|
||||
|
||||
nix derivation show "$chart_drv" \
|
||||
| jq -r '.[].env.helmValues' \
|
||||
| yq -y
|
||||
| yq -p json -o yaml
|
||||
|
|
Loading…
Reference in a new issue