I need an equivalent of Unix shell script:
#!/bin/bash
# save incoming YAML to file
cat > all.yaml
# modify the YAML with kustomize
kustomize build . && rm all.yaml
but for Windows. I end up with:
@echo off
type > all.yaml
kustomize build .
but it's not working - generated file is empty. I ask kindly for help.
Command cat > all.yaml
takes standard output and stores it in all.yaml file. Helm operates on std in/out and Kustomize on files, so this script ensures proper communication between this tools. Script is provided to helm like: helm upgrade <release_name> <chart> --post-renderer kustomize
(script is saved in file kustomize).
EDIT
Simplifing I look for Windows equivalent of Unix's:
whoami | cat > file.txt