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

Could global params be stored in conf.json and used in script.json files ? #616

Open
raszuk opened this issue Jan 8, 2023 · 5 comments
Open
Labels

Comments

@raszuk
Copy link

raszuk commented Jan 8, 2023

Hi,

After setting up 40 different scripts I found that it would be super useful if we could use parameters stored globally in conf.json as part of some fields in script.json files.

For example instead of typing

/home/robert/arclab_v1/bin as Working directory in 40 files to define it once in conf.json and only use ${BIN_HOME} as example.

Same for some script names inside parameter definition - for example instead of placing
ls /home/robert/arclab_v1/labs in 30 params just use ${ls_labs}

The main reason for this ask is ability to easily migrate to different server, different user etc ... without having to modify 100s of script.json files :) Not sure if this is possible today with some workaround or if ticket has been already logged for it before.

@RollingHog
Copy link
Contributor

Reasonable suggestion, don't know any workarounds.

I'm not that good at Bash/Powershell - are you sure such template syntax won't interfere with them? If it won't, then I guess its a good idea.

@raszuk
Copy link
Author

raszuk commented Jan 16, 2023

Well if this is or those are a new json object(s) they will not interfere with anything other then the code which reads them.

So to be 100% on the safe side we could predefine say 10 user configurable global json objects example: user_obj_1..user_obj_10 and let user use it as it seems fit.

@bugy
Copy link
Owner

bugy commented Jan 16, 2023 via email

@raszuk
Copy link
Author

raszuk commented Jan 16, 2023

Oh ... did not know about it ... but even after reading #133 I am not sure if it does what I am asking for here.

How can I use objects/variables in WebUI if I create and define a new file include.json in runners folder ?
I do not want and manually edit/touch all script files with vi or sed ;)

So far it looks like include file can extend my script parameters which is very cool on its own (but not what I am asking for).

I was just trying to have some global variables from global.json available to all scripts - that's all. The use is to have for example ${HOME} instead of typing in each script's Working directory field "/home/robert/arclab_v1/bin"

@bugy
Copy link
Owner

bugy commented Jan 16, 2023

Sorry, i probably misunderstood you then.
I thought, that you can define common json file(s), where you would specify working directory and/or parameters.
And then include this(these) file(s) in each of your configurations
Of course this would still require a bit of duplication (for the include section), but at least this would solve env issue.

@bugy bugy added the feature label Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants