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:
@ -14,19 +14,16 @@ import (
|
||||
|
||||
type Context = contextStore.Metadata
|
||||
|
||||
func CreateContext(contextName string, user string, port string) error {
|
||||
host := contextName
|
||||
if user != "" {
|
||||
host = fmt.Sprintf("%s@%s", user, host)
|
||||
}
|
||||
if port != "" {
|
||||
host = fmt.Sprintf("%s:%s", host, port)
|
||||
}
|
||||
host = fmt.Sprintf("ssh://%s", host)
|
||||
// CreateContext creates a new Docker context.
|
||||
func CreateContext(contextName string) error {
|
||||
host := fmt.Sprintf("ssh://%s", contextName)
|
||||
|
||||
if err := createContext(contextName, host); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
logrus.Debugf("created the %s context", contextName)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user