forked from toolshed/abra
refactor!: drop all SSH opts / config handling
See coop-cloud/organising#601 See coop-cloud/organising#482
This commit is contained in:
@ -53,7 +53,7 @@ func cleanUp(domainName string) {
|
||||
// Docker manages SSH connection details. These are stored to disk in
|
||||
// ~/.docker. Abra can manage this completely for the user, so it's an
|
||||
// implementation detail.
|
||||
func newContext(c *cli.Context, domainName, username, port string) error {
|
||||
func newContext(c *cli.Context, domainName string) error {
|
||||
store := contextPkg.NewDefaultDockerContextStore()
|
||||
contexts, err := store.Store.List()
|
||||
if err != nil {
|
||||
@ -67,9 +67,9 @@ func newContext(c *cli.Context, domainName, username, port string) error {
|
||||
}
|
||||
}
|
||||
|
||||
logrus.Debugf("creating context with domain %s, username %s and port %s", domainName, username, port)
|
||||
logrus.Debugf("creating context with domain %s", domainName)
|
||||
|
||||
if err := client.CreateContext(domainName, username, port); err != nil {
|
||||
if err := client.CreateContext(domainName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -158,12 +158,7 @@ developer machine.
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
hostConfig, err := sshPkg.GetHostConfig(domainName)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
if err := newContext(c, domainName, hostConfig.User, hostConfig.Port); err != nil {
|
||||
if err := newContext(c, domainName); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user