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

Add possibility to set path to config.json file #93

Open
Kittiman opened this issue May 2, 2018 · 5 comments
Open

Add possibility to set path to config.json file #93

Kittiman opened this issue May 2, 2018 · 5 comments

Comments

@Kittiman
Copy link

Kittiman commented May 2, 2018

It would be nice to be able to set the path to the config.json file this would also open up to have different config.json files / profile. config-test.json, config-prod.json etc.

It look like the path to the config.json file is hard-code.

Ex:
-Dapigee.configFile=.\foo\config.json

@ssvaidyanathan
Copy link
Collaborator

HI @Kittiman - you should be able to put all the environment related configurations within the same config.json. The sample config.json shows how you can have different config for each environment. The "name" property maps to the environment followed by what configuration you need under proxies, targets and policies. You can have all of those under each environment you listed within the same config.json. The plugin will pick the appropriate configurations and do the needful. Hope that clarifies

@Kittiman
Copy link
Author

Kittiman commented May 2, 2018 via email

@ssvaidyanathan
Copy link
Collaborator

Thanks for getting back. Still unclear on your explanation. Can you give me an example ? The whole point of having this within the main project is so that only the proxy's configurations are kept within this file. Not sure I get your problem. If you can provide an example, that will help. Your ask is not a big enhancement, just wondering if its needed.

@Kittiman
Copy link
Author

Kittiman commented May 3, 2018

Hi @ssvaidyanathan
When we use our deployment process we want to be able to deploy with maven to our sandbox environment with different username/prefix in the proxy url. This is to be able to have same proxy in sandbox for individual deployment until we merge it to our master branch.
Ex /products should be /products${suffix]
In the config.json file it is not possible to use ${} and get maven to replace this when applying this to the deployment package. We neither want to change to original config.json file that is checked in to the git repository. We want to copy the original file make the change and use this file when package, for example place this file in the target folder when running maven package.
Currently we have added a maven replace that make this change in the target folder and have excluded the proxy url part in the config.json file for our sandbox environment.
But this is the reason we thought that it would be nice to be able to tell where the config.json file is located. And this also would open up more possibility of how to handle the config.json file for different CI thinking.
We think that this would be a nice enhancement and quite an easy change, as you also did write.

@ssvaidyanathan
Copy link
Collaborator

We have seen customers do the replace approach. However will get back to you once we have this pushed.

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

2 participants