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

Config file driven by environment variable #489

Open
cmaahs opened this issue Mar 6, 2023 · 0 comments
Open

Config file driven by environment variable #489

cmaahs opened this issue Mar 6, 2023 · 0 comments

Comments

@cmaahs
Copy link

cmaahs commented Mar 6, 2023

This may simply be unique to my use case, though I thought I'd share in case it someone else might find it useful.

I work on multiple Jira systems. And use the go-jira tool extensively. My initial method was to just copy a <system>-config named file to config.yml in order to effectively switch between the Jira systems / boards.

This of course switches every session at once, which is undesirable. So I added code to look at GOJIRA_CONFIG environment variable and use that to prefix the config.yaml -> ${GOJIRA_CONFIG}-config.yml. Of course one could instead use a full path to the config file.

Clearly easy enough to implement, here is the diff on my fork: https://github.com/cmaahs/jira/compare/master...cmaahs:jira:maahs?expand=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant