DecorateEnvVars
Decorates environment variables and environment sources with context-specific, execution-specific, and default values, including those from task environment variables, plugin configurations, and Kubernetes secrets/config maps.
def DecorateEnvVars(
ctx: context.Context,
envVars: []v1.EnvVar,
envFroms: []v1.EnvFromSource,
taskEnvironmentVariables: map[string]string,
id: pluginsCore.TaskExecutionID,
consoleURL: string
) - > []v1.EnvVar, []v1.EnvFromSource
Decorates and augments a list of environment variables and environment sources with additional context-specific, execution-specific, and configuration-defined variables and secrets. This function ensures that all necessary environment configurations are present for a task's execution.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the current operation, used to retrieve context-specific environment variables. |
| envVars | []v1.EnvVar | The initial list of environment variables to be decorated. |
| envFroms | []v1.EnvFromSource | The initial list of environment sources to be decorated. |
| taskEnvironmentVariables | map[string]string | A map of task-specific environment variables to be added. |
| id | pluginsCore.TaskExecutionID | The unique identifier for the task execution, used to retrieve execution-specific environment variables. |
| consoleURL | string | The URL of the console, used to retrieve execution-specific environment variables. |
Returns
| Type | Description |
|---|---|
[]v1.EnvVar, []v1.EnvFromSource | The augmented list of environment variables and environment sources. |