adobe / aio-cli

Adobe I/O Extensible CLI
https://www.adobe.io
Apache License 2.0
77 stars 33 forks source link

Support IO workspace specific .env configurations in AB apps #376

Open elagun opened 1 year ago

elagun commented 1 year ago

Expected Behaviour

When working and deploying AB apps to different IO workspaces, different environment specific configurations are required as input for the actions. The environment specific configs are stored in the .env file, however there is only one file, so manual changes are required to the file each time. This is not only cumbersome but also error prone, i.e. when forgetting to update the .env file and deploying the wrong config. Some custom scripted approaches exists for this common requirement, but a proper product solution should be provided.

To support workspace specific configurations the following structure and functionality is proposed:

Actual Behaviour

Currently only one .env file exists for all workspaces which prevents proper workspace specific configurations

Platform and Version

Sample Code that illustrates the problem

On a brief look into the code, this could be a place to add this feature: https://github.com/adobe/aio-cli-plugin-app/blob/70b9a426c7972c20cced304254d4c84c73fcd78a/src/lib/import.js#L606

aiojbot commented 1 year ago

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-1860