Commit d995ae2c authored by Andy Cobaugh's avatar Andy Cobaugh

build: support per-deployable env vars

parent 02ea8501
Pipeline #120056 waiting for manual action with stages
in 47 seconds
......@@ -220,6 +220,11 @@ func buildDockerAndDeploy(config config.Config) error {
args = append(args, "--set", "secrets."+key+"="+os.Getenv(key))
}
}
if len(deployable.EnvVars) > 0 {
for k, v := range deployable.EnvVars {
args = append(args, "--set", "environmentVariables."+k+"="+v)
}
}
mockWebAccessUser := viper.GetString("build.webaccess.user")
if mockWebAccessUser != "" {
args = append(args, "--set", "environmentVariables.MOCK_WEBACCESS_USER"+"="+mockWebAccessUser)
......
......@@ -17,14 +17,15 @@ type (
LocalSecrets []string `json:"localSecrets"`
}
Deployable struct {
Name string `json:"name"`
Dockerfile string `json:"dockerfile"`
Image string `json:"image"`
ImageTag string `json:"imageTag"`
Chart string `json:"chart"`
ChartVersion string `json:"chartVersion"`
LocalConfig string `json:"localConfig"`
LocalOnly bool `json:"localOnly"`
Name string `json:"name"`
Dockerfile string `json:"dockerfile"`
Image string `json:"image"`
ImageTag string `json:"imageTag"`
Chart string `json:"chart"`
ChartVersion string `json:"chartVersion"`
LocalConfig string `json:"localConfig"`
EnvVars map[string]string `json:"envVars"`
LocalOnly bool `json:"localOnly"`
}
HelmValues struct {
EnvironmentVariables map[string]string `yaml:"environmentVariables"`
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment