Repository navigation
Add ATMOS_CLI_CONFIG_PATH ENV var. Add functionality to define atmos custom CLI commands - #168
Conversation
ATMOS_CLI_CONFIG_PATH ENV var. Add functionality to specify atmos custom commandsATMOS_CLI_CONFIG_PATH ENV var. Add functionality to define atmos custom CLI commands
RB (nitrocode)
left a comment
There was a problem hiding this comment.
Lots of nitpicks but looks good to me
Co-authored-by: nitrocode <[email protected]>
Co-authored-by: nitrocode <[email protected]>
|
This is beautiful! So amazing we can now add a subcommand to any existing command or add totally new commands/subcommands. |
| @@ -214,6 +214,16 @@ | |||
| "spec": { | |||
There was a problem hiding this comment.
Can we add something to the readme regarding this or will updating the website suffice ?
Also can we add an "inspiration" page to show that we looked into ahoy and choria-io to help build this interface ?
https://github.com/choria-io/appbuilder
https://github.com/ahoy-cli/ahoy
RB (nitrocode)
left a comment
There was a problem hiding this comment.
Mostly nitpicks. I think we should have an inspiration section. I don't want to forget it so I'll write up a new ticket #169.
what
ATMOS_CLI_CONFIG_PATHENV varatmoscustom CLI commandswhy
ATMOS_CLI_CONFIG_PATHENV var allows specifying the location ofatmos.yamlCLI config file. This is useful for CI/CD environments (e.g. Spacelift) where an infrastructure repository gets loaded into a custom path andatmos.yamlis not in the locations whereatmosexpects to find it (no need to copyatmos.yamlinto/usr/local/etc/atmos/atmos.yaml)Detect more YAML stack misconfigurations, e.g. when the same tenant/environment/stage is defined in more than one top-level YAML stack config file (directly or via imports).
For example, if the same
var.tenant = tenant1is specified fortenant1-ue2-devandtenant2-ue2-devstacks, thecommand
atmos describe component test/test-component-override -s tenant1-ue2-devwill throw this errorAllow extending
atmoswith custom commands. Custom commands can be defined inatmos.yamlCLI config file. Custom commands support subcommands at any level (e.g.atmos my-command subcommand1 suncommand2 argument1 argument2 flag1 flag2)Custom commands support Go templates and ENV vars in commands steps, and Go templates in ENV vars values, as well as allow specifying an external executable to be called to get the value for an ENV var.
They are automatically added to
atmos help:Custom commands test
references