1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-16 05:16:08 +02:00

add --kube-context to uninstall command (#4999)

This commit is contained in:
Googlom 2024-07-29 19:48:56 +05:00 committed by GitHub
parent 36f8d35f1c
commit 61b9df54b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -296,6 +296,9 @@ func (h *HelmExecute) RunHelmUninstall() error {
if len(h.config.Namespace) <= 0 {
return fmt.Errorf("namespace has not been set, please configure namespace parameter")
}
if len(h.config.KubeContext) > 0 {
helmParams = append(helmParams, "--kube-context", h.config.KubeContext)
}
helmParams = append(helmParams, "--namespace", h.config.Namespace)
if h.config.HelmDeployWaitSeconds > 0 {
helmParams = append(helmParams, "--wait", "--timeout", fmt.Sprintf("%vs", h.config.HelmDeployWaitSeconds))