1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-09-16 09:26:22 +02:00

fix param type

This commit is contained in:
maksim bondarenko
2025-07-23 17:17:18 +03:00
parent c604e77303
commit c43d384cc8
2 changed files with 13 additions and 2 deletions

View File

@@ -55,6 +55,7 @@ type kubernetesDeployOptions struct {
SetupScript string `json:"setupScript,omitempty"`
VerificationScript string `json:"verificationScript,omitempty"`
TeardownScript string `json:"teardownScript,omitempty"`
KubectlSetImage []string `json:"kubectlSetImage,omitempty"`
}
// KubernetesDeployCommand Deployment to Kubernetes test or production namespace within the specified Kubernetes cluster.
@@ -238,6 +239,7 @@ func addKubernetesDeployFlags(cmd *cobra.Command, stepConfig *kubernetesDeployOp
cmd.Flags().StringVar(&stepConfig.SetupScript, "setupScript", os.Getenv("PIPER_setupScript"), "HTTP location of setup script")
cmd.Flags().StringVar(&stepConfig.VerificationScript, "verificationScript", os.Getenv("PIPER_verificationScript"), "HTTP location of verification script")
cmd.Flags().StringVar(&stepConfig.TeardownScript, "teardownScript", os.Getenv("PIPER_teardownScript"), "HTTP location of teardown script")
cmd.Flags().StringSliceVar(&stepConfig.KubectlSetImage, "kubectlSetImage", []string{`false`}, "If set, the step will use `kubectl set image` command to update the image of the deployment.")
cmd.MarkFlagRequired("containerRegistryUrl")
cmd.MarkFlagRequired("deployTool")
@@ -713,6 +715,15 @@ func kubernetesDeployMetadata() config.StepData {
Aliases: []config.Alias{},
Default: os.Getenv("PIPER_teardownScript"),
},
{
Name: "kubectlSetImage",
ResourceRef: []config.ResourceReference{},
Scope: []string{"PARAMETERS", "STAGES", "STEPS"},
Type: "[]string",
Mandatory: false,
Aliases: []config.Alias{},
Default: []string{`false`},
},
},
},
Containers: []config.Container{

View File

@@ -539,8 +539,8 @@ spec:
- PARAMETERS
- STAGES
- STEPS
- name: KubectlSetImage
type: string
- name: kubectlSetImage
type: '[]string'
description: "If set, the step will use `kubectl set image` command to update the image of the deployment."
default: false
scope: