Enhances https://github.com/helm/chart-testing with jq, yq and bash Also adds a "Stage Check" utility
Small CLI tool to prevent copy-paste errors from one stage to another.
stage-check.sh <stage> <file>
- Exit code 0 if everything is ok
- Exit code 1 if a file contains strings it should not.
Config is done via yaml. The command will take chose the first matched config file:
.stage-check.yaml
in your working dir.stage-check.yaml
in the scripts directory (see this file)
Add any stage you like as key. As long as you do not call it global
which is reserved to define global ignores.
# SAMPLE
global:
allow:
- intranet
dev:
deny:
- int
- prod
allow:
- integration
# ... more stages ...
- Copy input file to ".tmp-stage"
- replace occurrences defined by a stage using
sed
- replace occurrences defined by
global
usingsed
- run
grep
for strings defined instage-name.deny
usinggrep -n denied-word
- Ignore Lines starting with '#' (comments)
- Find a better way than replacing allowed values with SED