mattcasters commented on issue #4193:
URL: https://github.com/apache/hop/issues/4193#issuecomment-5968406419
A proposal for issue #4193:
The project can optionally declare environment profiles and a variable
contract. Checking out a project then configures the workstation from that
contract, instead of recreating the environment entries by hand. Existing
projects with no profile keep working as they do now.
**Committed with the project.** Each profile has a name, a purpose, whether
it is normally wanted on a workstation, and a template configuration file such
as `${PROJECT_HOME}/config/dev.json`. Variables described by the project gain
two flags: "to be specified" and "is a secret". A provided value is committed
only when it is safe to share. A secret, or anything machine-specific, is left
empty. A vault expression counts as provided.
**Local to the machine.** The answers still go in an environment
configuration file, not a new store. The default location is
`${HOP_CONFIG_FOLDER}/environments/<project>/<environment>.json`, and
`hop-setup` already recommends `~/.local/share/hop` (or `${XDG_DATA_HOME}/hop`)
for that folder, and `%USERPROFILE%\.hop\config` on Windows. Setup asks for the
path once, with the recommended value filled in. The `environments/` directory
is created as `700` and each file as `600`. Hop warns if that is not true, and
does not refuse to run. The local file is loaded after the template, so it only
holds the overrides. A local-only environment, such as a sandbox, stays in
`hop-config.json` and is never written back to the project.
**When a project is added in the GUI.** Hop offers the profiles that apply
on a workstation, usually development and not production. For each chosen
profile it asks only for the keys marked "to be specified", masks the secrets,
writes the answers to the local file, and wires that file in after the
template. A server skips the dialog. The same metadata tells `hop-conf` which
keys are missing, and the deploy pipeline supplies the file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]