Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user-defined environment variables in machine.ini #162

Open
hagertnl opened this issue Mar 12, 2024 · 0 comments
Open

Allow user-defined environment variables in machine.ini #162

hagertnl opened this issue Mar 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@hagertnl
Copy link
Contributor

I propose that we consider allowing a user-defined section of environment variables that can be included in .ini and the environment variables are then set in the environment. Additionally, in job script templates, allow a __custom_machine_env__ or similar replacement which is then replaced by these variables in the job script. Example:

vanilla_machine.ini:

...
[Site-custom]
my_custom_env_1 = abc
my_custom_env_2 = def

Then RGT_MY_CUSTOM_ENV_1=abc and RGT_MY_CUSTOM_ENV_2=def are set in the environment.
Then this line in the job script template:

__custommachine_env__`

Could be replaced by

export RGT_MY_CUSTOM_ENV_1=abc
export RGT_MY_CUSTOM_ENV_2=def

Note that the Bash language is not guaranteed for job scripts, so we'd probably have to do some leg work for that.

Currently, you can hack this together using some obscure harness features and hard-to-read templates, this would just make things much easier and more readable.

@hagertnl hagertnl added the enhancement New feature or request label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant