refactor!: maintain "domain"
All checks were successful
continuous-integration/drone/push Build is passing

See toolshed/organising#636
This commit is contained in:
decentral1se 2025-01-03 08:24:03 +01:00
parent 2dc8034c16
commit 1194f3b228
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
23 changed files with 36 additions and 36 deletions

View File

@ -11,7 +11,7 @@ import (
)
var AppBackupListCommand = &cobra.Command{
Use: "list <app> [flags]",
Use: "list <domain> [flags]",
Aliases: []string{"ls"},
Short: "List the contents of a snapshot",
Args: cobra.ExactArgs(1),
@ -61,7 +61,7 @@ var AppBackupListCommand = &cobra.Command{
}
var AppBackupDownloadCommand = &cobra.Command{
Use: "download <app> [flags]",
Use: "download <domain> [flags]",
Aliases: []string{"d"},
Short: "Download a snapshot",
Long: `Downloads a backup.tar.gz to the current working directory.
@ -130,7 +130,7 @@ var AppBackupDownloadCommand = &cobra.Command{
}
var AppBackupCreateCommand = &cobra.Command{
Use: "create <app> [flags]",
Use: "create <domain> [flags]",
Aliases: []string{"c"},
Short: "Create a new snapshot",
Args: cobra.ExactArgs(1),
@ -174,7 +174,7 @@ var AppBackupCreateCommand = &cobra.Command{
}
var AppBackupSnapshotsCommand = &cobra.Command{
Use: "snapshots <app> [flags]",
Use: "snapshots <domain> [flags]",
Aliases: []string{"s"},
Short: "List all snapshots",
Args: cobra.ExactArgs(1),

View File

@ -13,7 +13,7 @@ import (
)
var AppCheckCommand = &cobra.Command{
Use: "check <app> [flags]",
Use: "check <domain> [flags]",
Aliases: []string{"chk"},
Short: "Ensure an app is well configured",
Long: `Compare env vars in both the app ".env" and recipe ".env.sample" file.

View File

@ -18,7 +18,7 @@ import (
)
var AppCmdCommand = &cobra.Command{
Use: "command <app> [service | --local] <cmd> [[args] [flags] | [flags] -- [args]]",
Use: "command <domain> [service | --local] <cmd> [[args] [flags] | [flags] -- [args]]",
Aliases: []string{"cmd"},
Short: "Run app commands",
Long: `Run an app specific command.
@ -192,7 +192,7 @@ does not).`,
}
var AppCmdListCommand = &cobra.Command{
Use: "list <app> [flags]",
Use: "list <domain> [flags]",
Aliases: []string{"ls"},
Short: "List all available commands",
Args: cobra.MinimumNArgs(1),

View File

@ -12,7 +12,7 @@ import (
)
var AppConfigCommand = &cobra.Command{
Use: "config <app> [flags]",
Use: "config <domain> [flags]",
Aliases: []string{"cfg"},
Short: "Edit app config",
Example: " abra config 1312.net",

View File

@ -26,7 +26,7 @@ import (
)
var AppCpCommand = &cobra.Command{
Use: "cp <app> <src> <dst> [flags]",
Use: "cp <domain> <src> <dst> [flags]",
Aliases: []string{"c"},
Short: "Copy files to/from a deployed app service",
Example: ` # copy myfile.txt to the root of the app service

View File

@ -23,7 +23,7 @@ import (
)
var AppDeployCommand = &cobra.Command{
Use: "deploy <app> [version] [flags]",
Use: "deploy <domain> [version] [flags]",
Aliases: []string{"d"},
Short: "Deploy an app",
Long: `Deploy an app.

View File

@ -11,7 +11,7 @@ import (
)
var AppEnvCommand = &cobra.Command{
Use: "env <app> [flags]",
Use: "env <domain> [flags]",
Aliases: []string{"e"},
Short: "Show app .env values",
Example: " abra app env 1312.net",

View File

@ -19,7 +19,7 @@ import (
)
var AppLabelsCommand = &cobra.Command{
Use: "labels <app> [flags]",
Use: "labels <domain> [flags]",
Aliases: []string{"lb"},
Short: "Show deployment labels",
Long: "Both local recipe and live deployment labels are shown.",

View File

@ -24,7 +24,7 @@ import (
)
var AppLogsCommand = &cobra.Command{
Use: "logs <app> [service] [flags]",
Use: "logs <domain> [service] [flags]",
Aliases: []string{"l"},
Short: "Tail app logs",
Args: cobra.RangeArgs(1, 2),

View File

@ -25,7 +25,7 @@ This new app configuration is stored in your $ABRA_DIR directory under the
appropriate server.
This command does not deploy your app for you. You will need to run "abra app
deploy <app>" to do so.
deploy <domain>" to do so.
You can see what recipes are available (i.e. values for the [recipe] argument)
by running "abra recipe ls".

View File

@ -23,7 +23,7 @@ import (
)
var AppPsCommand = &cobra.Command{
Use: "ps <app> [flags]",
Use: "ps <domain> [flags]",
Aliases: []string{"p"},
Short: "Check app deployment status",
Args: cobra.ExactArgs(1),

View File

@ -16,7 +16,7 @@ import (
)
var AppRemoveCommand = &cobra.Command{
Use: "remove <app> [flags]",
Use: "remove <domain> [flags]",
Aliases: []string{"rm"},
Short: "Remove all app data, locally and remotely",
Long: `Remove everything related to an app which is already undeployed.

View File

@ -15,12 +15,12 @@ import (
)
var AppRestartCommand = &cobra.Command{
Use: "restart <app> [[service] | --all-services] [flags]",
Use: "restart <domain> [[service] | --all-services] [flags]",
Aliases: []string{"re"},
Short: "Restart an app",
Long: `This command restarts services within a deployed app.
Run "abra app ps <app>" to see a list of service names.
Run "abra app ps <domain>" to see a list of service names.
Pass "--all-services/-a" to restart all services.`,
Example: ` # restart a single app service

View File

@ -12,7 +12,7 @@ import (
)
var AppRestoreCommand = &cobra.Command{
Use: "restore <app> [flags]",
Use: "restore <domain> [flags]",
Aliases: []string{"rs"},
Short: "Restore a snapshot",
Long: `Snapshots are restored while apps are deployed.

View File

@ -21,7 +21,7 @@ import (
)
var AppRollbackCommand = &cobra.Command{
Use: "rollback <app> [version] [flags]",
Use: "rollback <domain> [version] [flags]",
Aliases: []string{"rl"},
Short: "Roll an app back to a previous version",
Long: `This command rolls an app back to a previous version.

View File

@ -17,7 +17,7 @@ import (
)
var AppRunCommand = &cobra.Command{
Use: "run <app> <service> <cmd> [[args] [flags] | [flags] -- [args]]",
Use: "run <domain> <service> <cmd> [[args] [flags] | [flags] -- [args]]",
Aliases: []string{"r"},
Short: "Run a command inside a service container",
Example: ` # run <cmd> with args/flags

View File

@ -20,7 +20,7 @@ import (
)
var AppSecretGenerateCommand = &cobra.Command{
Use: "generate <app> [[secret] [version] | --all] [flags]",
Use: "generate <domain> [[secret] [version] | --all] [flags]",
Aliases: []string{"g"},
Short: "Generate secrets",
Args: cobra.RangeArgs(1, 3),
@ -140,7 +140,7 @@ var AppSecretGenerateCommand = &cobra.Command{
}
var AppSecretInsertCommand = &cobra.Command{
Use: "insert <app> <secret> <version> <data> [flags]",
Use: "insert <domain> <secret> <version> <data> [flags]",
Aliases: []string{"i"},
Short: "Insert secret",
Long: `This command inserts a secret into an app environment.
@ -230,7 +230,7 @@ func secretRm(cl *dockerClient.Client, app appPkg.App, secretName, parsed string
}
var AppSecretRmCommand = &cobra.Command{
Use: "remove <app> [[secret] | --all] [flags]",
Use: "remove <domain> [[secret] | --all] [flags]",
Aliases: []string{"rm"},
Short: "Remove a secret",
Args: cobra.RangeArgs(1, 2),
@ -338,7 +338,7 @@ var AppSecretRmCommand = &cobra.Command{
}
var AppSecretLsCommand = &cobra.Command{
Use: "list <app>",
Use: "list <domain>",
Aliases: []string{"ls"},
Short: "List all secrets",
Args: cobra.MinimumNArgs(1),

View File

@ -17,7 +17,7 @@ import (
)
var AppServicesCommand = &cobra.Command{
Use: "services <app> [flags]",
Use: "services <domain> [flags]",
Aliases: []string{"sr"},
Short: "Display all services of an app",
Args: cobra.ExactArgs(1),

View File

@ -18,7 +18,7 @@ import (
)
var AppUndeployCommand = &cobra.Command{
Use: "undeploy <app> [flags]",
Use: "undeploy <domain> [flags]",
Aliases: []string{"un"},
Short: "Undeploy an app",
Long: `This does not destroy any application data.

View File

@ -22,7 +22,7 @@ import (
)
var AppUpgradeCommand = &cobra.Command{
Use: "upgrade <app> [version] [flags]",
Use: "upgrade <domain> [version] [flags]",
Aliases: []string{"up"},
Short: "Upgrade an app",
Long: `Upgrade an app.

View File

@ -14,7 +14,7 @@ import (
)
var AppVolumeListCommand = &cobra.Command{
Use: "list <app> [flags]",
Use: "list <domain> [flags]",
Aliases: []string{"ls"},
Short: "List volumes associated with an app",
Args: cobra.ExactArgs(1),
@ -71,12 +71,12 @@ var AppVolumeListCommand = &cobra.Command{
}
var AppVolumeRemoveCommand = &cobra.Command{
Use: "remove <app> [flags]",
Use: "remove <domain> [flags]",
Short: "Remove volume(s) associated with an app",
Long: `Remove volumes associated with an app.
The app in question must be undeployed before you try to remove volumes. See
"abra app undeploy <app>" for more.
"abra app undeploy <domain>" for more.
The command is interactive and will show a multiple select input which allows
you to make a seclection. Use the "?" key to see more help on navigating this

View File

@ -65,7 +65,7 @@ func NewVersionOverview(
upperKind := strings.ToUpper(kind)
rows := [][]string{
{"APP", domain},
{"DOMAIN", domain},
{"RECIPE", app.Recipe.Name},
{"SERVER", server},
{"CONFIG", deployConfig},
@ -164,7 +164,7 @@ func DeployOverview(
}
rows := [][]string{
{"APP", domain},
{"DOMAIN", domain},
{"RECIPE", app.Recipe.Name},
{"SERVER", server},
{"CONFIG", deployConfig},
@ -244,7 +244,7 @@ func UndeployOverview(
}
rows := [][]string{
{"APP", domain},
{"DOMAIN", domain},
{"RECIPE", app.Recipe.Name},
{"SERVER", server},
{"CONFIG", deployConfig},

View File

@ -15,7 +15,7 @@ func TestEnsureDomainsResolveSameIPv4(t *testing.T) {
}{
// NOTE(d1): DNS records get checked, so use something that is maintained
// within the federation. if you're here because of a failing test, try
// `dig +short <app>` to ensure stuff matches first! If flakyness
// `dig +short <domain>` to ensure stuff matches first! If flakyness
// becomes an issue we can look into mocking
{"docs.coopcloud.tech", "swarm-0.coopcloud.tech", true},
{"docs.coopcloud.tech", "coopcloud.tech", true},
@ -43,7 +43,7 @@ func TestEnsureDomainsResolveSameIPv4(t *testing.T) {
func TestEnsureIpv4(t *testing.T) {
// NOTE(d1): DNS records get checked, so use something that is maintained
// within the federation. if you're here because of a failing test, try `dig
// +short <app>` to ensure stuff matches first! If flakyness becomes an
// +short <domain>` to ensure stuff matches first! If flakyness becomes an
// issue we can look into mocking
domainName := "collabora.ostrom.collective.tools"
serverName := "ostrom.collective.tools"