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

fix(helm): Remove double deployment of helm charts (#1947)

* Remove double deployment of helm charts

* Adapt unit test

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
This commit is contained in:
Sacha Droste
2020-08-24 16:05:05 +02:00
committed by GitHub
parent 48620c3f49
commit f6f85342b7
2 changed files with 3 additions and 3 deletions

View File

@ -166,7 +166,6 @@ func runHelmDeploy(config kubernetesDeployOptions, command command.ExecRunner, s
command.Stdout(stdout)
log.Entry().Info("Calling helm upgrade ...")
log.Entry().Debugf("Helm parameters %v", upgradeParams)
command.RunExecutable("helm", upgradeParams...)
if err := command.RunExecutable("helm", upgradeParams...); err != nil {
log.Entry().WithError(err).Fatal("Helm upgrade call failed")
}

View File

@ -148,7 +148,8 @@ func TestRunKubernetesDeploy(t *testing.T) {
runKubernetesDeploy(opts, &e, &stdout)
assert.Equal(t, "helm", e.Calls[1].Exec, "Wrong upgrade command")
assert.Equal(t, 1, len(e.Calls), "Wrong number of upgrade commands")
assert.Equal(t, "helm", e.Calls[0].Exec, "Wrong upgrade command")
assert.Equal(t, []string{
"upgrade",
"deploymentName",
@ -166,7 +167,7 @@ func TestRunKubernetesDeploy(t *testing.T) {
"testCluster",
"--testParam",
"testValue",
}, e.Calls[1].Params, "Wrong upgrade parameters")
}, e.Calls[0].Params, "Wrong upgrade parameters")
})
t.Run("test kubectl - create secret/kubeconfig", func(t *testing.T) {