Skip to content

Commit 4038967

Browse files
make env-vars parameter as array (#171)
* make env-vars parameter as array * fix release pipelines
1 parent 29284cb commit 4038967

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

venona/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.13
1+
1.4.14

venona/build/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ steps:
88
title: Clone repository
99
type: git-clone
1010
repo: https://github.com/codefresh-io/venona
11-
revision: ${{CF_BRANCH}}
11+
revision: ${{CF_PULL_REQUEST_TARGET}}
1212
credentials:
1313
username: github
1414
password: ${{secrets.hybrid.git}}

venonactl/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.13
1+
1.4.14

venonactl/build/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ steps:
99
title: Clone repository
1010
type: git-clone
1111
repo: https://github.com/codefresh-io/venona
12-
revision: ${{CF_BRANCH}}
12+
revision: ${{CF_PULL_REQUEST_TARGET}}
1313
credentials:
1414
username: github
1515
password: ${{secrets.hybrid.git}}

venonactl/cmd/install-agent.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var installAgentCmdOptions struct {
4242
agentID string
4343
kubernetesRunnerType bool
4444
tolerations string
45-
envVars string
45+
envVars []string
4646
dockerRegistry string
4747
}
4848

@@ -98,10 +98,9 @@ var installAgentCmd = &cobra.Command{
9898
s.Version.Current.Version = version
9999
}
100100
s.DockerRegistry = installAgentCmdOptions.dockerRegistry
101-
if installAgentCmdOptions.envVars != "" {
101+
if installAgentCmdOptions.envVars != nil {
102102
s.AdditionalEnvVars = make(map[string]string)
103-
parts := strings.Split(installAgentCmdOptions.envVars, ",")
104-
for _, part := range parts {
103+
for _, part := range installAgentCmdOptions.envVars {
105104
splited := strings.Split(part, "=")
106105
s.AdditionalEnvVars[splited[0]] = splited[1]
107106
}
@@ -139,7 +138,7 @@ func init() {
139138
installAgentCmd.Flags().StringVar(&installAgentCmdOptions.kube.context, "kube-context-name", viper.GetString("kube-context"), "Name of the kubernetes context on which venona should be installed (default is current-context) [$KUBE_CONTEXT]")
140139
installAgentCmd.Flags().StringVar(&installAgentCmdOptions.kube.nodeSelector, "kube-node-selector", "", "The kubernetes node selector \"key=value\" to be used by venona resources (default is no node selector)")
141140
installAgentCmd.Flags().StringVar(&installAgentCmdOptions.tolerations, "tolerations", "", "The kubernetes tolerations as JSON string to be used by venona resources (default is no tolerations)")
142-
installAgentCmd.Flags().StringVar(&installAgentCmdOptions.envVars, "envVars", "", "More env vars to be declared \"key=value\"")
141+
installAgentCmd.Flags().StringArrayVar(&installAgentCmdOptions.envVars, "envVars", nil, "More env vars to be declared \"key=value\"")
143142
installAgentCmd.Flags().StringVar(&installAgentCmdOptions.dockerRegistry, "docker-registry", "", "The prefix for the container registry that will be used for pulling the required components images. Example: --docker-registry=\"docker.io\"")
144143

145144
installAgentCmd.Flags().BoolVar(&installAgentCmdOptions.kube.inCluster, "in-cluster", false, "Set flag if venona is been installed from inside a cluster")

0 commit comments

Comments
 (0)