Created
October 26, 2021 13:14
-
-
Save PixelRobots/6c6ba584fdd4825a68161c9b47d31bc2 to your computer and use it in GitHub Desktop.
capture helm and kubectl output to a variable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$command = $(helm uninstall me 2>&1) | |
if ($command -match 'error' ) { | |
write-host "error = $command" -ForegroundColor Red | |
} | |
$command = $(kubectl apply -f me.yaml 2>&1) | |
if ($command -match 'errror' ) { | |
write-host "error = $command" -ForegroundColor Red | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment