You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the plugin deploy stage, if the ENV variable is set for the respective bitops plugin config option, it'll be ignored and the config setting will be applied instead. The expectation is that the ENV always takes precedence.
Seems to me that this is an issue caused by overriding the env var..
Something like
def add_value_to_env(export_env, value):
...
if value is None or value == "" or value == "None" or export_env is None or export_env == "":
return
if os.environ.get('BITOPS_'+export_env):
logger.info("Environment Varible alredy set. Configuration value ignored.")
return
...
During the plugin deploy stage, if the ENV variable is set for the respective bitops plugin config option, it'll be ignored and the config setting will be applied instead. The expectation is that the ENV always takes precedence.
Example
Example Terraform schema:
https://github.com/bitops-plugins/terraform/blob/ce701be1616cec9420b9ae484e2533ba131cddbf/bitops.schema.yaml#L19-L23
https://bitops.sh/tool-configuration/configuration-terraform/#terraform-bitops-schema
With the following
bitops.config.yaml
:and
BITOPS_TERRAFORM_COMMAND=destroy
, theterraform apply
is executed which is undesired.Example Docker CLI command:
Will run
terraform apply
instead ofdestroy
.Expected behavior
The ENV variable if set should always override the respective bitops.config section based on the plugin schema.
Logs
Based on the logs,
BITOPS_TERRAFORM_COMMAND=apply
is derived from config:The text was updated successfully, but these errors were encountered: