Skip to content

How to override system-imaging config variables? #203

@karlatec

Description

@karlatec

Hi!

I am trying to override a variable from system-imaging section of configuration file.

[system-imaging.images.fedora_43-x86_64]
cloud.url = "REPLACED_BY_ENV_VARIABLE_IN_WORKFLOW"

I don't want to put an actual value in there because it's supposed to be a variable - the URL will change.

I followed https://cijoe.readthedocs.io/en/latest/configs/index.html and tried:

  1. Overriding using env variables:
    Which says Convert the configuration path and name to uppercase. Replace any dots (.) with underscores (_). This would result in variable like: SYSTEM-IMAGING_IMAGES_GUEST_OS_X86_64_CLOUD_URL. But this doesn't work, as there's a dash in the variable name.
export SYSTEM-IMAGING_IMAGES_GUEST_OS_X86_64_CLOUD_URL=test
-bash: export: `SYSTEM-IMAGING_IMAGES_GUEST_OS_X86_64_CLOUD_URL=test': not a valid identifier
  1. Overriding using multiple configuration files.
    I removed cloud.url from the configuration file and created a second configuration file with just:
[system-imaging.images.fedora_43-x86_64]
cloud.url = "https://some-url.com"

and then run with -c config1.toml -c config2.toml, but got an error about cloud.path not being defined. Seems like all configuration from config1 was ignored, instead of just overriding parts defined in config2?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions