env_append()
def env_append(name, value, help, separator) -> dictAppends a value to an environment variable.
The value will be created if it does not exist.
Args
name: string: The name of the environment variable.value: string: The value to append.help: string: Help text that will be added to the workspace.separator: string: The separator to use.
Returns
A dictionary containing the environment variable.
env_assign()
def env_assign(name, value, help) -> dictAssigns an environment variable to the workspace.
Args
name: string: The name of the environment variable.value: string: The value of the environment variable.help: string: Help text that will be added to the workspace.
Returns
A dictionary containing the environment variable.
env_inherit()
def env_inherit(name, help, assign_as_default, is_secret, is_required, is_save_at_checkout) -> dictInherits an environment variable.
Args
name: string: The name of the environment variable.help: string: Help text that will be added to the workspace.assign_as_default: The default value to assign if the variable is not set in the calling environment.is_secret: bool: If true, the value will be redacted in the logs.is_required: bool: If true and no value can be inherited and not default is provided, the operation will fail.is_save_at_checkout: bool: Whether the variable should be saved at checkout.
Returns
A dictionary containing the environment variable.
env_prepend()
def env_prepend(name, value, help, separator) -> dictPrepends a value to an environment variable.
The value will be created if it does not exist.
Args
name: string: The name of the environment variable.value: string: The value to append.help: string: Help text that will be added to the workspace.separator: string: The separator to use.
Returns
A dictionary containing the environment variable.
env_script()
def env_script(name, script, help, shell, assign_as_default, is_secret, is_required, env) -> dictEvaluates a script to get the value of the environment variable.
Args
name: string: The name of the environment variable.script: string: The script to evaluate to get the value of the variable.help: string: Help text that will be added to the workspace.shell: The shell to use to evaluate the script.assign_as_default: The default value to assign if the variable is not set in the calling environment.is_secret: bool: If true, the value will be redacted in the logs.is_required: bool: If true and no value can be inherited and not default is provided, the operation will fail.env: dict: Environment variables to pass to script evaluation (no other variables will be passed).
Returns
A dictionary containing the environment variable.