-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Is your feature request related to a problem? Please describe.
Currently complyctl commands expect to find the complytime.yaml config file in the current working directory. This can be a disruptive flow as a user navigates their file system they need to cd back into the config directory before executing a command.
Currently NewWorkspace() hardcodes "complytime.yaml" relative to cwd scan output, generation state, logs all use "." and ".complytime/" relative to cwd. Plugins then receive workspace: "." as a variable, persist state.json relative to cwd
Describe the solution you'd like
Make the workspace directory a configurable value and treat workspace directory is the anchor. Config, scan output, generation state, and plugin state all live relative to it.
- Add a --workspace / -w flag to Common options
- Add env var fallback COMPLYTIME_WORKSPACE
- Update NewWorkspace to accept a base directory
- Pass the workspace dir through all commands. Every command that calls NewWorkspace() would use the resolved dir instead. The hardcoded "." references would use the resolved workspace dir.
- Update plugin target variables. The workspace variable passed to plugins in the Target.Variables map should use the resolved dir instead of ".".
- Update log file writer. The lazyLogWriter in root.go uses complytime.WorkspaceDir (relative ".complytime"). This needs the resolved path.
Describe alternatives you've considered
Do nothing, keep as is.
Additional context
Add any other context or screenshots about the feature request here.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status